 Thanks, Dimitri. Thank you. Well, I really guess that the after party went really well yesterday because and not too many people here But at least you want to get your themes approved. So. Oh, thank you Well, let me quickly introduce myself. My name is Dimitri Mayurov. I like was said came from Moscow and I am a theme designer Which means that I design and develop WordPress themes for living and I did that for my clients for like four or five years now and recently I decided to try myself in creating public themes Because there are a couple of reasons for that simply the one of them is that I really can't imagine my life without creating themes and the second is that I was I once wanted to Find a simple theme for my portfolio and couldn't find one because many themes were bloated with options and Some I didn't like so I decided to create my own and founded a theme shop called theme patio It's a new one and has only one thing yet and released a first public theme called maker I Am really excited that it now has more than a thousand active installs Which means that more than a thousand people actually use it on their website and it's a very basic portfolio thing that you can download and see how it works and I See how it is built so We are going to discuss Tips but before that let's stop for a second and think why even bother releasing a public theme if it's free and What do you get from that? Well personally, I believe that the more you give the more you get and WordPress is Something that gives us a lot. I mean one way or another it puts food on our tables and new smartphones in our pockets and Why not give back to the community and create a website a theme that someone else can use someone can learn from it? in turn You will get feedback not only from theme reviewers, but also from real users across the world and Believe me when you're thinking that the theme is done when you're finished building it And you're thinking that there's nothing add to add or to remove from it There's so many things that can be improved and releasing a theme is a great way of finding though those things which In turn leads to becoming a better designer and better developer. So Yeah, this is the Reasons why you release your you would want to release your theme publicly so the first thing The first tip I wanted to talk about and releasing tips releasing themes is the GPL license I know that many of you are familiar with with the GPL license, but I Decided to cover it anyway because The the philosophy and the idea behind this license kind of drives the entire community because the WordPress itself is released under the GPL license so Let's quickly refresh in our memory what this license gives The user of the theme and any software it gives the user free for basic freedoms it gives He is basically a free to use the theme for any purpose. He's free to study the source code. He's free to modify it and Redistribute the theme or redistribute the modified copies. I know that two last points May sound a little bit weird for those of you who have not heard of the GPL license But it's actually a good thing and we'll cover that in a little bit later so How exactly do we make a theme GPL friendly or GPL compatible? Well, let's start with simple things. We first need to declare the license in style CSS and Read me the XT you see those two blue lines Mentioning the name of the license and the license URL Basically the website where you can read the text of the license So if your theme is simple enough, this is it the You declare the license in those two files and it's GPL compatible but I'm guessing that this is not the case with most most of the themes nowadays because If you bundle anything be that a jQuery plugin or a custom icon font or any anything else All those things all those resources must be GPL as well or be GPL compatible So if you are using anything like Let's say type icons you have to make sure that the That icon font is GPL or GPL compatible same goes for Images that you're using your theme including images that you use in a screenshot that goes to the theme repo and You have to mention all those resources images and custom code in read me the XT file This is actually the thing that I forgot to do when I first submitted maker to the repository so I know that There are so many licenses out there and it's very easy to get confused about all of them But the good news is that it's very easy to check what license is GPL compatible and What license is not you just go to gnu.org website under the link you see on the screen and can see the list of all Compatible and incompatible licenses with GPL so summing up the First step you need to declare the license in style CSS and read me the XT bundle only GPL friendly code Use GPL friendly images and provide all in more info in read me TXT. So this is basically how you make your theme GPL The next step don't start from scratch I know this is also may sound very obvious for those of you who are already already building themes, but Let's just quickly Mention some of the options for those who are just beginning. So The most obvious choice for a starting building a starting a new theme is to use underscores Which is a starter theme that was used to build default themes like when he 1615 and some of the others It has a great markup and PHP foundation and doesn't have too many too much Styles to remove so you can start building your theme on top of that on top of underscores and Like it will save Great amount of time another option is components, which I think was discussed yesterday It has several pre-built partners for building sites like portfolio magazine websites business type websites and every It has several pre-built partners like I said and you can choose one of them to build a theme With And it will have Something special for building a theme of the chosen type And like underscores it has a builder on the website where you can provide Where you can set your own name for a theme and download the zip archive and start building the team right away also save Huge amount of time. All right next step follow the requirements easier said than done, but I Know that It's very easy to get confused about the amount of the requirements you need to follow in order to Get your theme to the repository but The goal of this talk is not to provide you with a complete checklist, but rather give a head start and useful links to Look up because it's not about knowing everything. It's about knowing where to look so I'll cover the most misunderstanding or Requirements or something that I messed up myself when I first submitted maker so you will not make these kind of mistakes and The first thing don't hard-code any scripts and styles to head Section and footer of your website instead use WP and Q script and WP and Q style I know this is very obvious, but I did theme reviews as a volunteer and Every theme that I was reviewing had something wrong with the scripts and this is just something that beginner developers tend to misunderstand so also talking about scripts where press bundles Many useful tools and libraries like jQuery like Backbone or underscore and if you are using one of these tools you need to use bundle versions and not allowed to load one from Your a theme folder, so this is the example of how to add jQuery for example one of the examples One of the ways of adding jQuery And you can look up the full list of bundled resources under the link you see on the screen alright Next thing prefix everything. This is also something that beginner developers tend to Not not doing right. I mean let's See the example. Let's say you have a function called Outputting your theme and think what will happen if you install a plug-in and it has a function with the same name a fatal error so The best way to do is to prefix functions this will prevent this kind of things and Will get your theme approved Not declined because of the prefixing thing Next thing validate and sanitize all the data that comes in and out of the database I know this may sound a bit scary and confusing for beginner developers, but It really is not about doing some hard I mean WordPress provides us with does all the heavy lifting for us and all we have to do as team developers is to understand the concept and use the right functions at the right places, so Let's say you want to add an option to customizer to Provide the user with a possibility to add custom footer text like this one So this will look this will be outputted in the footer and Basically used as a copyright text The main thing here is to make sure that user does not save any potentially harmful data to database Using that field in the customizer and to do that there there are a lot of functions that will strip out all the potentially evil Scripts and styles and other things, but one of them is sanitize text field So in order to prevent a user from saving any harmful data we need to pass it as a sanitize callback simple as that and This is not everything Before displaying that function we need to actually escape HTML Because the database can be altered directly. It's not something that happens every day, but still plausible. So rather than just echoing the data from customizer from database We first need to get it and then pass it through escape HTML function so as you can see the concept is Not very hard and you can see you can look up all the Available functions for escaping and sanitizing data under the link you see on the screen The next thing translatable strings This is something that is different between building a theme for a client and building a public theme because if I know for sure If I'm building a theme for a client and know for sure that it will not be used In languages other than English. It's perfectly safe to do something like this and just display a string But it's different with public themes. We need to provide the users and with a possibility to translate themes and to do that we need to pass the string to the translator to the special function and Provide the theme slot seems like is basically as custom string that you use throughout the code of the theme and This is how it works or there is another function that looks something like this that just simplifies things but This is also not everything because if we do something like this We provide the translator of a theme with the possibility to add custom HTML or even JavaScript to a theme if it is used in other language. So instead of doing this we need to do this combining the Translatable string with the escape HTML function that we used in one of the previous examples so Yeah, you can find more info on translating Themes under the link you see on the screen as well Another thing and under the requirements tip is theme versus plug-in territory, which I think is Also very important. So think for example, it may be very tempting to add something like Google Analytics code for into Google Analytics field to add Google Analytics code to customizer, but Sooner or later the user will change the theme and if he changes the theme and the Google Analytics code is saved within the theme mode It will no longer be be on the website and Google will not be able to track visitors of the website so it's much better to use a plugin for that and Same goes for custom SEO settings and other things like that So don't go to plug-in territory if you are a theme developer Yeah, like I said the goal of this talk is not to to cover all the requirements, but rather give you and Place to look so the full list of the requirements that theme need to follow It needs to follow it can be found in the handbook and you can see the link to the handbook on the screen All right next tip and if you were to take out only one tip from my talk today I would say learn the source code of the default themes because they are really Hidden gems in terms of code quality because they're used by millions of people around the world and Like I said before the GPL license gives us the freedom to learn the source code And this is why studying the default themes is actually a great thing. You can also study other themes from the repository as well because Some of them are really great All right the next thing when the theme is done, it's Probably the best idea to test it before you submit it to the repository and I'll be talking about testing themes in terms of code quality and in terms of content handling because these are the things that themes are required to Follow in order to get to the repository So the first thing you need to do to test the theme before releasing it is actually enable the debug mode well Actually, you need to enable the debug mode even before you write the first line of code. So you do that in WP config PHP and It will allow you to see all PHP errors During the development of the theme Next thing you need to do is you need to get is to install as To install a theme check plugin Basically, it's a plugin that is designed to test the themes Against WordPress requirements violations and if your theme has something wrong with it It Will tell you what to fix and if it passes all the test you'll see the nice green screen like this one saying that everything is okay Next thing one of my favorite tools in terms of testing themes is the code sniffer with WordPress coding standards the code sniffer is a Command line tool that allows you to check your theme Against not just requirements, but against WordPress coding standards violations from missing space to missing and escape HTML functions and it can scan all your files and output the list of Mistakes and errors that you've made which is very comes in very handy so In terms of content handling The first thing you need to do to check your theme is install the theme unit test data. Basically, it's combination of all the available Of the content that user can Put in the editor and Create within from within the dashboard It's a great way to test your theme against edge cases like for example when a post doesn't have a title or when it has Huge amount of tags or categories those things must not break the layout of the theme and the theme unit test is a great way to test the theme against those things so Next thing is the monster widget plug-in which is basically a combination of all the default widgets Combined in one so you can just drag one widget to the sidebar and have all the default widgets and See how they look on the website And the last tip in terms of testing theme In terms of content handling is test your theme with a real content I have a copy of my own blog on my local Environment and the copy of my sister's blog so I usually test my themes with that content as well because It's a great way to see how the theme handles real content and Because the theme unit test data and monster widget They do not give you the idea how the theme will look like because they are kind of messy All right now that your theme is Passes all the tests and you're happy with it This might be also a very good idea to become a reviewer yourself because this will most likely Give you an idea how the whole system works. I mean the system of uploading reviewing track tickets and all this stuff You will probably Learn new things from the theme you'll be reviewing and Help other people learn as well, which is also giving back to a community, which is cool so yeah, if you didn't do that you can try becoming a reviewer because New tickets new themes are coming in every day and The I think the theme review team will really appreciate if you can help out and the last tip which I think is one of the most important is Goes like this keep it simple because I know it may be very tempting to include lots of options to customize or to provide the user with a possibility to change things but Think of it this way the The less options you add the less code you'll have to write and the less code the reviewer will have to go through in order to check your theme and The last time the user will actually Spend figuring out how the theme works and the more time the user will actually spend creating content rather than figuring out the The way how your theme works, so this is it. Thank you Be happy to answer some questions if you haven't heard one Thanks, Demetri. So we have 10 minutes or so for questions We've got some mic runners So pop your hand up if you have a question. We'll get a mic to you and Then speak into the mic and enunciate your words It's more of confirmation really you touched on Validation and sanitation. Yeah, okay And one goes in one comes out. So it's more about escaping. I read somewhere Not so long ago, but it was about escaping late So I just wanted to wonder if you knew the answer to that or you could elaborate on that I think it's something to do with if you if you escape something in a function That's the wrong way to do it and you should escape At the very last when you act as a yes, that's right. Is that is that basically so that's just That's confirmed. Yeah, that's the idea. It's a good way. It's it's a great idea to escape as as late as possible because You Don't know Well, let's A simple example probably So if a variable has Retrieve some value from the database and you know now that it does not have any potentially harmful data but it might this thing may may change in future and Escaping as late as possible is a great way to prevent Against those two. I mean make it as safe as possible and to prevent any Bad things in future Great. Thank you. Hey, um, I Hope you don't mind asking this, but how do you market your themes? So how how do you actually sell them? How do you put them in in front of people so that they actually? Take them because there are a lot out there obviously So how do yours take precedence over the others? So the question is how do I market my themes? Okay? That's a good question. I First wanted to Couple of years before Releasing the my first team. I wanted to get on theme for us because I saw all this Theme developers that create themes that are sold there and wanted to do the same but I didn't want to Create things like that. I wanted to do simple things and theme for us How do I put it? They don't really like simple things. They tend to like things that bundle all the stuff and in them so Maker the theme that I released is free and you can get it for free from the repository and it also has some Editions that you can buy directly from from from my website But I'm not sure that Well, yeah, this is basically it Probably I'll try to submit the submit the theme to theme for us, but we'll see how it goes Great. So you you're almost upselling then right rather than directly selling. Yeah, yeah free and then an upsell Yeah, I think it's a great way for user to test and get the idea how the theme works because the It happened a lot of times with my customers that they bought a theme from theme for us And then they did not like it or it was badly coded or So if you can test theme before actually Upgrading I think it's a great way Great. Thanks. Thanks. I just wanted was wondering whether we can get your slides because there's so much information I couldn't Answer I did not get that your slides your presentation. Could we download them from somewhere? which slide All of them because there were so many links. Oh Yeah, yeah, yeah, don't worry. I'll do it the link right. Okay. Thanks. That's all Thanks for the great talk. I wanted to ask you if you provide paid support for your theme and if it's a good Business model to you know to keep the theme free but provide paid support So the question is is it is it a good business model to provide paid support I think yes because And not all the users of the theme are Experienced with WordPress and they tend to misunderstand simple things which are very easy for people who Are doing it like every day so helping them is Not something that takes much time, but I mean, yeah, it's a great way to help out and maybe earn some money Thank you. Yes Hi Demetri My question follows on from the last question a little bit Which is that I guess once you've released your theme and you now have a thousand people Maybe more than a thousand people using it I'm imagining that those people Want to contact you to tell you about bugs that they're having request new features complain about something Pat you on the back and tell you how great it is. How do you as a as a theme developer? How do you manage dealing with the free support that you're kind of expected to provide? well, that's a great question and this is what is good with Simple themes because you don't create any custom functionality that user is Seeing the first time and you're using only Features that comes with WordPress which many of users are familiar with so Said that I don't get too many support requests that Are heavy to are hard to handle so basically I get questions. How do I? Cut the insert the continue reading link on After the post or how why my featured images are not the right size which is basically leads to saying install regenerate plugins regenerate thumbnail plugins and This is it. So that's this is what it was good with creating simple things Does that answer your question? Yeah, thanks Yes, right there Thank you, Dimitri. I was a little late now for sure you have that in the presentation But I just wanted to learn a little bit about you can explain the steps or for a new developer What is the best way to get and learn and put a new theme down there? It is a guide or is something for wrong from WordPress with best practices that we have to follow you know what I mean So the question is how to keep up with the community and great thing. Yes, okay I think that the best thing to do is to do things that you love doing and Don't look at everybody else as like silly is it may sound but only by Creating something that you really only by doing something that you really enjoy doing you'll get the feedback that you want to get and It worked pretty well for my theme because I really did not expect so many people to install it but Yeah, so I Guess this is the answer Hi, Dimitri Well here, sorry. Oh, yeah just some of the numbers How long did it take you to complete your theme? How long is it taken to get a thousand users? It was released I think in November 2015 or December and I don't remember exactly and Yes, so it's like couple of two or three months And It took me about Two months to build it. I know it's a lot of time, but I was not sure that I'm doing everything right and was constantly Testing the theme and there are still a lot of things to to to improve and because it's it's a process You can't just create a theme get it to the repo and forget about it It's it's a it's a constant process of improving and learning and changing It's just like that and and with a thousand downloads What is this the ongoing support? What does that look like in terms of are you getting questions on a daily or a weekly? Yeah, like I said, I don't get too many questions because the theme is very simple it uses only WordPress features Well, it can it is It works with jetpack custom portfolio type and the pro version only adds possibility to change colors, so Yeah, it's pretty easy to use and that's what is good with simple themes. So This is why I don't get too many support requests. It's right here. I was just wondering how you manage version control Are there any requirements for that? I use git And the theme is also available on github so you can see all the things that are going behind the development there I try to Make good commit messages because I'm really crazy about it and I also Have a pro version in a separate branch on my computer that I sync with pit bucket So this is basically So I wanted to Loop back on something you've talked about a little bit already But I wanted to just kind of ask you to expand on it something I see I guess a lot of themes and theme developers doing is I Guess filling their themes with features and you touched on it with the Google analytics Problem, which is that if you're storing Google analytics data in the theme Then they're gonna lose that when they switch themes But but what I guess how do you as a theme developer? How do you decide what functionality should be part of your theme and what functionality should be in a plug-in? It's a really simple rule of thumb if the option Deals with the visual representation of the website. It's a theme territory if it's If it has nothing to do with visual representation, it's a plug-in So recently Well, actually I'm building a new thing right now and I had a question in my mind is it a good idea to add an option to a widget that would change the text alignment and I asked this question on slack and Some team review team admins just gave me that advice that I'm saying right now I guess this is it. Okay. I think we're I think we're about out of time anyway, so let's give Dimitri a round of applause Thank you