 Yay! We've been given the go-ahead by the WZoom lady to let us know that things are recording. Welcome everybody as you join. It is lovely to see you all again and welcome to anybody who's here for the first time. I have no preparation things to ask you to do today. Today is going to be a very relaxed Thursday morning or afternoon or evening wherever you are. So as you join let us know where you're joining us from and while you're doing that I'll introduce myself. My name is Jonathan. I live in Cape Town, South Africa. I am sponsored. I work at automatic and I'm sponsored to work with the training team and that means I create these workshops, these online workshops, we create tutorials, we create lesson plans and all kinds of other learning material for learn.wordpress.org. I am based in Cape Town and it is currently the middle of winter in Cape Town. So it is cold and it is wet and it is windy. We don't get snow but we do get lots of rain so everything is flooding. If you watch the news, the news will tell you that Cape Town is being flooded at the moment and you will see videos of cars driving through water and all kinds of other fun things. So that's what's happening in Cape Town right now. I also am still recovering from a little bit of, excuse me, a little bit of a cold so I'm going to take a throat lozenge now because I'm going to be talking for the next hour and while I do that I will start reading the chat and seeing where everybody is from. Pro tip folks, if you're ever hosting a workshop, take the throat lozenge before you hit record. Ben is from Austin, Texas. Welcome Ben. What's the weather like in Austin today? Ben, is it, I assume it's summer up there in the Northern Hemisphere? I just got back from WordCamp Europe in Athens and it was, Ben says it's hot, very hot. Yes, Athens was hot, very hot and it was quite a mind shift getting back from Athens after experiencing summer. 102, wow, that is very warm. Okay. So today we're going to be running a, or at least I'm going to be hosting a WordPress developer quiz. It is the first time I've done anything like this. I have done a quiz before. I did it at my meetup, my local Cape Town meetup recently and it was quite fun just to run through some personally related questions and see what folks know. So we're going to have, I'm going to dive into the announcements quickly first and then we'll get on to the rules. Once again, welcome everybody. Welcome to everybody who is here. I did post this meetup, this online workshop a little bit later than normal, so we're going to have a small group which is perfectly fine. As always, please let me know if you can't see the slide right now on screen. So you should see an announcement slide with all of these announcements that I'm busy reading out. If you can't see that, let me know and I'll just re-enable the share. Hi, Shimali, welcome. We are presenting in focus mode. I don't have a co-host with me today because I posted the online workshop a bit too late. So focus mode just means that you all can see me, but you can't see each other. If you would like to enable your video, you're more than welcome to, but you're welcome to leave it disabled as well. If you want to take a score while we work through this, it would be really cool if we could have a winner or a few winners at the end of this. Either grab a pen and paper to keep back of your score or some kind of note taking up on your PC. And as we go through each question, you'll be able to keep track of your score whether you've got the questions right or not. If I'm going too fast, please do let me know. I will be posting this to WordPress TV afterwards. I don't know if it'll benefit anybody to have it there, but we can always post it afterwards. And then if you're looking for more WordPress developer content or any kind of WordPress focus content to learn, you can go to learn.wordpress.org. All right, the rules for today. This goes without saying, but no cheating, please. All of the questions that I'm asking today are either findable in a WordPress install or on the WordPress.org website. Excuse me. So please no cheating. Let's be honest and let's see how well you know WordPress from a developer point of view. There are four sections with five questions each based on, and I should change this to the WordPress developer, WordPress developer docs and the WordPress developer site or the WordPress website. So effectively, you can go on to WordPress.org and like looking for these answers if you really wanted to. I'm going to read each question twice, and then I'm going to leave a few seconds to let you think about whether you know the answer. If you think that you know the answer, you can write it down, you can type it out, whatever the case may be. And then I will give you four possible answers. So I'll limit your options. So you see maybe if you can guess from those four answers, if your answer was in those four. If you don't have an answer, you can choose from one of those four and then write down what you think the answer is. I will then read out the correct answer. And if your answer that you chose or wrote down was correct, please award yourself one point. Welcome JC who's joining us. I'm just running through the rules. You're welcome to read them as I go there. If anyone disagrees with whether or not that is a correct answer, you are welcome to say so either in the chat or unmute your mic and say so. And then we'll check it out together and we'll go and we'll go and find the point in the documentation where I found what I believe to be the answer and we can discuss that. As I said earlier, there are four rounds or four sections at the end of each round. Total up your score for that round and then share it with us in the chat. It would be fun to see who's getting what at the end of each round. And then finally, right at the end of the quiz, total up your score and share that in the chat with us. And then we will see who can crown themselves the WordPress developer quiz winner for today. Just to note on the questions, there are very, I would say beginner friendly questions. I've based most of them on the content that I've been working on over the course of the last year. So I think this is going to be something that I'm going to do every year at around about this time in June. So just for some context, the first tutorial or at least the first workshops that I created for WordPress were around May, June. So I'm thinking of doing this sort of every year as a semi-anniversary thing. Maybe even if we do it around about the same date or a similar date to the WordPress anniversary, it could be a fun little thing we do every year. So it will be developer focused and I will base it on the previous years worth of content that I've created. So every year it'll get a little bit harder and a little bit more difficult. Okay. Any questions from anybody about how this is going to work? You are, of course, welcome to just sit and listen if you want to. You can have to participate, but if you would like to participate, that would be great. Any questions, any comments, anything you want to say or do or ask before we kick off? All right. I don't have any questions. So what I'm going to do now is I'm going to switch over to the actual developer quiz side. I will be keeping an eye on the chat. You're also welcome to unmute if you want to say anything or ask questions. Hopefully you've got your pen, paper, and or note taking app ready. And try not to read ahead with the questions down the side. I wonder if one can hide the form strip. Yes, we can. We can hide the form strip. Excellent. So you can't jump ahead before we get there. All right. Let's move on to the first section. The first section is general WordPress knowledge. So this is less developer focused and we'll just kind of general things around WordPress with a little bit of a developer start if you will. And the first question is which version of WordPress and when I say version, I mean the version number of WordPress was the first released with the new block editor code named Gutenberg. In other words, which version of WordPress was Gutenberg merged to WordPress core? Don't post your answer in the chat yet. Don't post your answers in the chat, write it down for yourselves and keep that to yourself for now. We can we can discuss it later. So which version of WordPress was the first released with the new block editor? The options that I will give you, I'm going to paste the options in the chat if you're not sure what options you have available to you. I hope this works. Yes, those are the options. So 4.8, 4.9, 5.0 or 5.1. Those are the four options that you have at around about the time that the question happened. So which version, excuse me, which version of WordPress was the first released with the new block editor code named Gutenberg? The answer, as somebody pointed out in the chat earlier, I did ask you to delete it so I didn't see who that was. But the person who posted that, if they could please post the answer again, the answer is 5.0. 5.0 was when Gutenberg was version to core. Who was that that said 5.0? I want to give them a quick, a quick well done. If you just remember who that was, the name went and disappeared again. Anyway, whoever that was well done. The answer is 5.0. That was when Gutenberg was first merged into WordPress core. And if you answered 5.0, please give yourself a point for that one. All right. Moving on to the next question. Remember, don't paste your answers in the chat because you're going to be giving answers away. What is the name of the WordPress file that contains the database credentials? So there's a specific file in WordPress. It contains the database credentials. What is the full name of that file? Some of you probably know what that is. We dive into it quite a bit when we work with these WordPress online workshops that I do. I'm going to copy out the answers here now. So here are your four options. The four options are WP-settings.hp, WP-config.php, WP-credentials, and WP-includes. So if you don't have an answer yet, you can pick from one of those. This should be doable by everybody, I would say. So if you're not sure, the answer will come to you now. The answer is, of course, option B, WP-config.php. So if you got that right, give yourself a point. If you didn't get that right and you disagree with me, you're welcome to let me know. But if you got that right, please give yourself a point. Okay. Moving on to the next question. Now, this one, no cheating. Please. It's very easy to cheat with this one. It takes a few seconds to load it up and have a look. But try and think about it and try and remember what the right answer is here. On a clean, brand new, clean default WordPress install. In other words, not one that is installed by a hosting company. It's a default core install. What is the first dashboard widget? So the dashboard widgets all happen on the right-hand side there of the dashboard. What is the first dashboard widget that appears on the page? So it's right at the top on the left, the very first dashboard widget that appears. Think about it. It's one of those ones where you log into the dashboard every day, but you never take notes of what the widgets are. So I'll give you some options. If you know the answer to this, well done. The options I'm going to give you are right now. At a glance, the site health status or the activity. So which one of those is the first one that appears on a brand new clean WordPress install? Then I've got a clean WordPress install open up here. Well, it's not clean anymore, but it was a default install. I haven't moved any dashboard widgets around. So we'll switch over to now and we'll see that site health status is the very first dashboard widget that appears. It used to be at a glance. At a glance used to be the first one. So if you answered at a glance, that used to be the way it is. But when site health was added to WordPress, site health became the first one that appears in the dashboard. Okay. So if you got that right, give yourself a point and we will move on to the next one. Okay. This one gets, this one gets a bit interesting. So what I'm going to do, I'm going to make this a little bit easier for you. I'm going to limit your options from the word go. It is done. I'm old school. Yep. I caught a couple of folks like that when I did the WordPress quiz at my local meetup agenda. Don't worry. All right. So I'm going to limit your options for this core contributors question. I'm going to paste them in the chat as they are. I'll read them out. So which of the following core contributors is not a member of the team known as the lead developers? So is it Helen Hossandi? Is it Mark Jaquith? Is it Andrew Oz? Or is it Jonathan Desrosier? Now I was fortunate to meet Jonathan at WordCamp Europe this week and get the pronunciation of his surname correct. Because I knew all the others, but not his. So I'm glad I'm able to pronounce that correctly now. So which of these, so all of these names, they are core contributors to WordPress. One of them is not part of the team known as the lead developers. If you know the answer, please write it down or just write down one to four, whatever the case may be. And then I will share the answer with you in a second. Okay. Hopefully you've picked one. Hopefully you think you know which one it is. The answer is Jonathan Desrosier. Jonathan is a member of the core contributors, but not a member of the team of lead developers. If you got that one right, well done. That means you know the core contributors and the lead developers quite well. If you don't know where to find the core contributors and the lead developers, you can go to the make WordPress teams. And I think it's useful to kind of know how to find these things. Go to the core team and then have a look in their handbook. I'll share this link with you in a second. And a project organization. I'll pop this link into the chat. And there you will see if you scroll down the project leadership, community leadership, the WordPress core team, which is Helen, Dion, Mark, Andrew, and Andrew. And then the committers, which is below that. And Jonathan Desrosier is in this list here somewhere. I don't see him right now. There he is, Jonathan Desrosier. So he is a core committer, but he is not a lead developer. That's our, yes, Edwin, that is a very hard, coordinate question. I can't have people getting everything right now, can I? Okay. What I'm hoping is that this quiz gets you to go and find out these things and go and read up a bit more about the project. That is the goal today. I should have probably mentioned that earlier. All right. So the next question, and we were just looking at the make teams. So this is very perfectly aligned with that page. Please don't go and cheat now if you have it open there. There are a number of make teams in the WordPress projects that contribute to different parts of the software. I'm going to give you three names of three make teams. I'm going to paste them in the chat. I'm going to read them out as well. And I want you to tell me which one is not a mech team. So the four teams are tied, open-verse, learn, and meta. So which one of those four names does not appear when you go to the make teams at WordPress.org? Don't go there now and cheat. If you don't know the answer, try and work it out. But which one of these four teams tied, open-verse, learn, and meta? Which one of their names does not appear at a make team on the WordPress.org make site? I'm going to have to edit out all the coughing, I think. All right. So hopefully you've gotten an answer for that one. Hopefully you've got an idea of what's going on. It's a little bit of a cheeky one. It's a little bit of a curveball. But let's go and have a look at the WordPress page. And I can tell you the answer before we go there. The answer is the learn team. That is the answer to this question. The learn team is not a make team. If you thought it was tied, tied is a make team. They're down here at the bottom somewhere. There it is tied. I recommend going and checking that out if you've never heard of it. Open-verse is also a make team. There it is over there. I recommend checking that out. The learn team doesn't exist. The learn team is actually the training team. They manage learn.wordpress.org. And they're sometimes called the learn team, but they're actually the training team. And then finally, the meta team is a team that exists. They manage all the WordPress.org websites. So if you got that one right, well done. It was purposely a tricky one. And hopefully, you've learned some more about some of the other make teams. All righty. Moving on. Sorry, my slides are doing weird things. Okay. What is the name of the initiative within the WordPress project that encourages organizations that use WordPress to contribute 5% of their resources to WordPress development? So if you know the answer to that, think about it and write it down. If you don't know, I'm going to give you some options in a second. But if you do know, write it down so long. Here are the four options I'm going to give you. Is it five for WordPress? Is it five for the future? Is it future five or is it WordPress five? I've given you some options there. Think about it. If you know the answer, go ahead and write it down or make a note. And then we will find out the answer. So which one is the name of the initiative that encourages organizations that use WordPress to contribute 5% of their resources to WordPress development? The answer, of course, is five for the future. It's an initiative that mapped, there it is, five for the future. Matt kicked off a number of years ago. And the idea is that if you are making money from WordPress, if you're a company that makes money from WordPress, ideally, you should participate in five for the future and dedicating 5% of your time back to the project. For some, it's easier than others. For some companies, it's easier than others. But most folks that I know in the project are either freelancers or working for companies do try and dedicate some of their time towards it. And that's what makes the project wonderful and what makes the project go. So if you've never heard of five for the future, do recommend going and reading about that. You can find the link over here. Okay. So we've reached the end of round one. We had five questions. Please total up your results for the end of round one. And please go ahead and post your results in the chat so we can see how everybody did. Stuart got four out of six. That's excellent. Well done. Hopefully, the one that you got wrong, I've inspired you to go and learn more about it. I'm going to guess it was maybe the dashboard one. Ben got one out of six. Shamali got three out of six. Adrian got two out of six. That's fine. That's the beauty of quizzes. Drivel got three out of six. Three out of five. There should be five questions. Not six, folks. So if you're posting out of four out of six, it should be four out of five. And this side, there were six. Were there six? Ready? Oh, there were six. Oh, that's, I do apologize. There were six. There were supposed to be five and one snuck in it. So I apologize. There were six. So all good. That was my mistake. Bonus question. Well done to those of you. Did anybody get all six right? Anybody get all six right? If you didn't, that's not a problem. I'm not expecting people to know all of these things. Some of these things I learned when I was putting this quiz together. Some of them I knew. The dashboard one, I kind of went in the dashboard and went down to look. So that one I learned. But learn when I was cheating because I worked with the training team, but I know folks call them the learn team. So that was a cheat on my part. So I would have, probably only got about four out of six. Okay. Right. So now we're going to move on to round two, which are developer fundamentals. There are five questions in this one. I did have five. So one, two, three, four, five. And let's move on to question one. So I'm going to give you four names. And I want you to tell me which of these four names is not a local development environment. And I'm going to add, this is a trick question. So which of the following is not a local development environment? The options are SHMP, I believe it's called XAMPB, MAM, Local by Flywheel, and Dev Kenster. Which one of those four is not a local development environment? Okay. So hopefully you've locked in your answer for that one. Hopefully it was very, very easy. If not, that's fine. As I said, it was a tricky question. The answer of course is bear with me, Local by Flywheel. And the reason for that is that Local by Flywheel is no longer called Local by Flywheel. It's now called localwp.com. Okay. So that was a little bit sneaky on my part or it's local. The company Flywheel was very tricky, but the company of Flywheel was I think acquired by the folks at WP Engine. Yes, I can see WP Engine at the top there. And they renamed Local by Flywheel because Flywheel is no longer a company to Local WP. And that is why it is known as now. So yes, it was a tricky question on my part. I do admit I like to be tricky like that sometimes. But yes, Local by Flywheel doesn't exist anymore. It's now known as Local WP. All right. The next question. Sorry. Which WordPress specific developer feature, and this is how it's described in the documentation, is described as a way for one piece of code to interact with or modify another piece of code at specific predefined spots. So which WordPress specific developer feature is described as a way for one piece of code to interact with or modify another piece of code at specific predefined spots? It's something that is very specific to WordPress. I have never seen this anywhere else. In fact, the only place that I have seen this elsewhere is where it's been implemented as it is implemented in WordPress. And I actually have seen this in the Laravel community, someone bought a package to implement this type of functionality within Laravel. The options I'm going to give you are actions, hooks, sorry, actions, filters, hooks and template tags. So one of those four is described in the documentation as a way for one piece of code to interact with or modify another piece of code at specific predefined spots. The answer is hooks. So hooks are the things that allow you to modify code at predefined spots. Actions and filters are a type of hook. Actions are a hook where you can execute specific functionality at that predefined spot. Filters are a type of hook where you can manipulate or modify another piece of code at that predefined spot, but they both fall under the term hooks. And template tags, obviously I have nothing to do with any of this. They are just functions that are worked in templates to call various pieces of data from the WordPress database. So I hope you got that right. If you answered actions, is very common or action hooks or something like that is very common for people to get those terms confused. So remember that hooks are the local term for actions or filters. You get action hooks and you get filter hooks. But the global term, those pieces of functionality are hooks. All right. Moving on, question three. In a default WordPress install, in other words, the Favours 500 install, the hosting company doesn't affect any changes. This is the default hardcoded into WordPress core. What is the prefix used for all table names? So this one should be fairly straightforward, but I will pop some options into the chat so that you can choose from them. Your options are WP, TBL underscore, WP underscore or WP underscore underscore. Those are the four options WP, TBL underscore, WP underscore or WP underscore underscore. Most folks should be able to get that right, I think, unless you've never worked with tables in that way in the database. But if you're not 100% sure, pick one from that list that you think looks right and then we'll see how it goes. All right. And the answer is WP underscore. So WP underscore is the default prefix for all WordPress tables. If you change the default prefix in the WP config file to something else, that will then become the prefix, the default prefix. But in a default WordPress install, that is what is set up in the code and that is what it will use. All right. Now this one gets a little bit trickier. So I'm going to give you the options before I'm not going to sort of leave it with you. I'm going to give you the options once I ask the question. And then I'll give you some time to think about the order of execution. But the question is, as part of a WordPress front-end request, what is the correct order of execution that takes place inside the WP blog header.php file? So the WP blog header bit.php file is the one that is included into the index file when a request runs. And then it performs three steps. And if you were here for my request life cycle workshop, you'll remember those steps. I'm going to paste the options here. The first option is, and I'm going to spread them out a little bit and then I'll read them out. So the first option is it runs, let me just paste this here. First option is it runs the WP function, requires the WP load.php file, and then requires the template loader. That's the first option. The second option is it requires the load.php file, requires the template loader file, and then runs the WP function. Or the third option is first it requires the WP load file, then runs the WP function, and then requires the template loader file. So those are the three possible orders of execution. One of them is correct. The other two are incorrect. So give it a think, give it a few seconds if you're not sure. Think about it in your head. Think about how things might execute. And then once you have an answer, write it down or make a note of which one of those three you want to go with. A little bit of a few seconds while I have this water and then we'll actually go and have a look and see what that order is. Okay, so let me open up my VS code and let's open up the WP blog header. And we will see the answer there is option number three. It first requires the WP load, which loads the entire library. Then it sets up the WordPress query by running the WP function. And then last but not least, it includes the template loader to then load the template for the data. So the correct answer in that list of three is the last one. So if you had ABC or 123, it would be C or three. If you got it right, give yourself a point. If you didn't get it right, that's okay. Now you know, and now if anybody comes up to you in the street that says to you, what's the order of execution, then you know the answer. Not that anybody might do that, but there you go. All right. And then moving on to the last question in this section, and we're coming up on half an hour, so that's perfect. Which is, now listen carefully to this one, which is the correct debugging constant to use when you want to disable logging errors to the screen? Okay. So which is the correct debugging constant to use when you want to disable logging errors to the screen? If you don't know that one, if you don't know what that is, I'm going to give you some options that you can choose from. I'm going to paste them in the chat and I'll read them out. The options are WP underscore debug, WP underscore debug underscore log, WP underscore debug underscore display, and then the save queries constant. So these are all uppercase. These are all constants. One of them you use to disable logging errors to the screen. Okay. And while we do that, I'm going to go on to the documentation so that we can find the answer. Now I'll just search for debugging in WordPress. And I'll find that in the docs. And the correct answer is the WP debug display constant. So if you answered, sorry, if you answered WP debug, that's the incorrect answer because that enables or disables the whole debugging functionality. WP debug log obviously enables logging the errors to a log file. And then WP debug display enables you to turn on or off with those errors on log to screen. So it's not that when you enable debug, it is switching it on to screen. That's just part of that functionality for displaying the screen. But you can use debug display to control that functionality. So a little bit of a tricky question on my part. I'd be interested to know if anybody disagrees with me on that answer. But I see the debug display one is the one that controls that functionality of displaying on the screen. Okay. So that was the end of round two. There were five questions that time. So total up your answers and then let me know in the chat what you got for the developer fundamental section. Ben got five. Yeah, well done, Ben. Okay, drill. I got four. Well done. That's good. Shimali got four. Excellent. Well done. Stuart got three. Good job. I mean, that is six out of 10. That's a 60%. That's a pass. And Adrian says two out of four. I was down to this question. Okay, fair enough, Adrian. We'll give you that one because you were downstairs and you weren't here. So well done everybody for your scores on that round. If you got them wrong, hopefully you either are comfortable to disagree with me and you will do so at some point in time. You're welcome to disagree in the chat or via using your mic. Or if you agree with me, then hopefully it's helped you and you learn a little bit more about some developer fundamentals inside of WordPress. Okay. Let us move on to section three. This should have been not round two. This should have been round three. WordPress themes. So we've got five questions around WordPress themes. The first question is what is the name given to the new type of WordPress theme that exists that uses both block theme elements and classic theme elements? In other words, it uses block templates and template parts and all that cool stuff, but it also uses PHP code and custom JavaScript and all those kind of things. There's a new term for that type of themes. We've got classic themes, which is the old school PHP stuff. We've got the block themes, which are the new using block templates and all that kind of thing. What is the name of the new type of WordPress theme that uses both block themes and classic themes elements? The options I'm going to give you if you're not sure, is it known as a hybrid theme? Is it known as a combination theme or is it known as a merge theme? And the answer, if you're not sure, the answer is hybrid themes. I don't quite know where the documentation is on that one, but if you search for hybrid theme, you should find that we talk about, here we go, WordPress to the resources. And they talk about a hybrid theme somewhere here. Hybrid theme is a classic theme that adopts site editing features such as a theme JSON or template editor. So it combines classic theme elements with block theme elements. That is a hybrid theme that we have right now. And then they talk about universal themes while we're here is a block theme that has the customizer options. The customizer is not available as a default to the block theme, but you can enable it by adding customized register in your functions.php. So there are some interesting theme types that are coming across as folks gradually adopt site editing features. So we effectively have four different types of themes now, which is quite interesting, I think. Okay, if you got that one right, give yourself a point and then we will move on to the next question. Which of the following files, and I'm going to read these files out and paste them in the chat, which the following files is not required for a valid classic theme. So we're thinking about PHP themes now. One of these files is not required. If you don't have this file in your theme, it'll still work as a classic theme. The options are index.php, functions.php, style.css and theme.json. So which of those files is not required for a classic theme? And if you're a classic theme developer and you get this one wrong, I will be very surprised. So which one of those files is not required for a classic theme? I'm just going to type it out. The answer is, of course, a theme.json file. So a theme.json file is very specific something to either a hybrid theme or a block theme. Adding a theme.json enables you to enable certain block theme functionality in your classic theme. There's only a certain limited set of functionality that you can enable, but you can add theme.json to your classic theme and it will enable certain functionality, but it is not required for a classic theme to be a classic theme. Okay. If you've got that right, give yourself a point. Otherwise, if there are no questions or arguments, if anybody disagrees with me, you're welcome to let me know. Otherwise, we'll move on to the next question. Okay. Now, this is another one of those tricky ones. So read and or listen to this very carefully. Which of the following files is, and I'm not saying required here, I'm saying is not strictly necessary for a valid block theme. What do I mean by strictly necessary? I mean, works in a valid block theme, but it can exist. It doesn't need to exist for a block theme to be a valid block theme. So the four options I'm going to give you, pasting them in the chat now are the index.html, functions.php, style.css or theme.json. So which of those, if you took it away, but you had the other three in a theme folder, it would still be a valid block theme. So we discussed this one very early on where we did a workshop on the basics of a block theme. There are essentially three core files that you need. If you have those three files, you have a valid block theme. The answer in this case is the functions.php file. You don't need a functions.php file for a block theme. You do need the style.css because that has the theme header. You do need the theme.json to have all the block theme stuff enabled. You can actually leave it out, but it's better to have one added because then you can customize for your specific theme, but it is actually one that you can leave out, but it's generally a good idea to include it. So I would call it necessary. And that's why I use the word not strictly necessary. And then your index.html is your root template file. You do need a root template file for a block theme. In this case, it's index.html, but your functions.php, you can take it out. If you just have an index.html, a style.css and a theme.json without a functions.php, your theme will still be a valid block theme. Okay, I hope everybody agrees with me on that one. If you don't, you're welcome to argue with me right now. Otherwise, we will move on to the next question. The next question is what must every theme have to make it a valid theme, block or otherwise, block theme, classic theme, hydro theme, it must have at least this thing. And so the options I'm going to give you are either Tristan's just entered here, so we're just going to let Tristan join, either an index, so either an index template file must be there or a style.css file must be there. Or you must have a theme header in your style.css, or all of the above, an index template and a style.css and a theme header comments in the style.css file. So which of those four options must every theme have to be a valid WordPress theme? So basically it's either A, B or C or D, all of the above. So let me know what you think there. Write down your answer if you're not sure. I mean, you are sure. And then we will look at the answer. Okay. And the answer is, of course, the last one, all of the above. It must have an index template file, either an index.php or an index.html, depending on the type of theme. It must have a style.css file and inside of the style.css, it must have a theme header. In a classic theme, you may be registering the style.css to get it to work using a function.php, but it must have those three things. So the answer is D, all of them. Hopefully, you all got that right. Okay. And then let us move on to the last question in this round. This one's a little bit of a PHP developer question. How can a WordPress developer ensure that any PHP functions developed for the theme do not create conflicts? So there are a couple of ways that we can do that, possibly, maybe, or there's one way. Let's have a look. So the options are, I'm just going to space these out so they're a little bit easier to read. Sorry, folks. So how can a WordPress developer ensure that any PHP functions developed for the theme do not create conflicts? The options are, by keeping them in the functions.php file, by not using the same function names as existing core functions, by ensuring that every function is namespaced, either with a custom function prefix or using custom classes, or by not creating any custom functions. So which one of those is the best option for ensuring that a WordPress developer creates PHP functionality that does not create conflicts? So if you know the answers to that, write it down. And then I'll give you a few seconds. And once you've written it down, then we'll reveal the other. Just to let you know, we're doing a WordPress developer quiz today. I'm just running through questions and answers and folks are taking scores. So you're welcome just to listen along. If you know the answers, you're welcome to write them down too, and then check them against your answers. But we're not posting those in the chat. Okay, just to not give it away. Wrapping each function, it does exist, is also a good option. But the only four options that I'm offering folks today are the four listed there. And the answer that I'm going to go with today of the four answers is to ensure that every function is namespaced, either with a custom prefix or a custom class object. Tristan's answer is not wrong. But the problem with doing that is if you want that specific functionality to work and somebody else is using the same function name, then your function is going to get overwritten by theirs or vice versa. So the best way to do is to have a prefix on the function name so you can keep your custom functionality, or put it into a custom class object for the function and then call your function names there. That's the best way to make sure that there are no conflicts. Okay. So those are the five questions for round, are we on round two, round three? For round three, anything to do with themes, please add up your scores for this round and let us know in the chat what you scored. And then we'll move on to round four. Okay, Drew all got five. Excellent. Ben got two. Edwin got two. Shamali got four. Well, everybody, hopefully you've learned something today for those of you who didn't get big scores, but hopefully you're enjoying this at least and you're sticking with us. So moving on to the last round, Tristan, if you want to join us, what I'm asking folks to do is make a note of their answers locally and if they get it right to give themselves a point. And if they disagree with what I'm saying, I think it's right, you're welcome to comment and say, I disagree with you and we can dive into it and go and have a look. Okay. So round four is all about WordPress plugins. And we're going to start with the first question. I'm not going to post answers in the chat because it's an easy one. It's a true or false question. True or false, it is possible to create a plugin just by adding a single PHP file inside the plugins directory and then putting your plugin functionality in there. I should have added that afterwards. So if you want to create a simple plugin, you can code your plugin in a single PHP file, make sure it has all the right information that it needs. And it just needs to be a single file in the plugins directory. Is that true or is that false? So write down your answer if you would like to or remember it in your head. I'm not going to post options because it's only a true or false. While I'm doing that, I'm going to open up my VS code instance because then we can have a look at the answer from there. So in my WP content plugins, the answer is of course true. And we know this because there is a plugin in the WordPress, sorry, in the WordPress core install called HelloDolly, which is literally one single hello.php file with the plugin header and all the plugin functionality in that one file. So yes, it is very possible to create a plugin that is just one file and just have that file in the plugins directory. It's not very neat that way. So generally it's better to put the plugin file inside a plugin folder. So it's nice and neat. And then as your plugin grows and you have more code, it's better to start separating things out and putting them into logical places, maybe considering using classes and objects to control a certain common functionality. But yes, it is perfectly possible to have a single plugin file in the plugins directory of your WordPress install and that can be your plugin file, your valid plugin. Okay. Moving on to question two, which of the, which of the following headers is not a valid, hang on, is not a valid plugin header field. So as we all know, the plugin header contains information of the plugin that the WordPress plugin repository reads from. I'm going to paste the four options in the chat that we can choose from. So which of the following is not a valid plugin header field? Is it the version? Is it requires at least? Is it license or is it domain? One of those four is an invalid plugin header. If you coded into plugin header, it would not work, it would not get picked up by anywhere. And it could be essentially useless. So with those four is not a valid plugin header field. Is it version requires at least license or domain? So while you're choosing your answer from there, I'm going to go and get the answer for you in the documentation. So we're going to go over to developer resource, no, not the documentation developer resources. We're going to go over into plugins and we're going to read about plugin basics. And we're going to read about header requirements. And here they talk about all the header fields. And if you look through this list, you will see that version is a valid header field requires at least sorry, requires at least is a valid header field. Sorry, my my chat GPT extension is causing all kinds of havoc. So I'm going to disable it for now. How can I disable it for now? How do I disable this? When I click the extension, there we go. So version is a valid field. Sorry, it's doing it again. Anyway, I'll figure it out. Requires at least over there is a valid field. License is a valid field, but domain is not a valid field. The domain related or the domain name related fields, either the plugin URI, the home page of the plugin, or the author URI, the author's website or profile or such. But there is no there is a text domain one and a domain path one, but there isn't a plugin header field specifically called domain. So if you got that right, give yourself a point. If you didn't get it right, you can read about the header requirements in the WordPress plugin documentation. All right, let's move on to the next question. I'm going to give you four different types of security vulnerabilities or security related issues, and for which one of these can you implement WordPress nonces to prevent? So the four types of possible vulnerabilities or ways of things, security, things as either SQL injection, invalid login attempts, in other words, folks attempt to log into your site, invalid user access, in other words, somebody having access to something they shouldn't, or something that's known as cross site request forgery, where a website from somewhere else can make a request to something on your site and access data they shouldn't. So which one of those four is prevented by implementing WordPress nonces? So have a think about it, it's a little bit of a more difficult one. While we're doing that, I'm going to go over to the section on plugin security, and I'm going to click on the answer. The answer is of course nonces. And let's have a look at the nonces page in the handbook and it says they help protect against several types of attack, including CSRF, but they do not protect against for certain types of attacks, they should never be relied on for authentication, authorization or access control. So authentication is invalid login attempts, invalid user accesses, access control, SQL injection. So you might have said SQL injection because sometimes people think about like the request coming from outside causing SQL injection, but really SQL injection is prevented by validating your inputs, not so much by cross-site request for you. Sometimes having a request that is not preventing cross-site, I can never say the whole word, cross-site request forgery ends up becoming a SQL injection attack because then folks can post data to your end point and then if they post the right data, a SQL injection attack can happen, but it's not the main thing that nonces are used for to prevent. So combination of nonces and validating your inputs will prevent both cross-site request forgery attempts and SQL injection attempts. Okay, if you disagree with me on that, you're welcome to have that discussion with me, but yet it says it here in the docs, nonces protect against several types of attacks, including cross-site request forgery. Okay, here's a point if you got that one right, and let's move on this just too late, and then we will call this a day, so I hope you're keeping score as you go. Which of the following is not a short code that is included in a WordPress install by default? So there are a series of short codes that WordPress sets up by default. They're not custom-developed, WordPress makes them available to you as a user or as a developer, and I've listed four in the chat, so the four that I listed are quote, gallery, audio, and embed. Which one of those four is not a valid default WordPress short code? While you're thinking about that, I'm going to go over to the WordPress site and I'm going to search for the term short code, and when we get to that page, we will reveal the answer. So I think we can just go to the common short code in the common API's handbook, and we will see somewhere here that I think is a list of them. Maybe it's not on this page. I think it's in the documentation section actually, now that I think about it. So let's go here. We're not going to find them now, are we? I found this page the other day, and I forgot the life of me, can't find it now, but anyway, the correct answer is the quote short code. So the quote short code doesn't exist as a short code at all. There is a quote block, but there isn't a quote short code. There is a gallery short code, an audio short code, and an embed short code. If you are an experienced classic editor person, you will know this, but there is a gallery audio and embed short code, but there isn't a quote short code. So if you got that answer correct, the incorrect short code would be the quote short code. If you got that correct, please give yourself one point. All right, let's find it. I'm going to find there's a page that specifically has the short codes listed. Shamali says which was the correct answer to this, the correct answer to that one. I'm going to paste over here for you is the one across site request forgery. The correct answer for this one was what? I'm going to do a search for short codes again just to find that list. Maybe it's under short codes or not short code. I'm not going to find this now. Anyway, I'll find it and I'll share it with folks afterwards if you would like. Okay, last question for the day. This one's a long one, so bear with me. When registering a custom post type using the register post type function, which is the argument that needs to be set to true to include the custom post type in the WordPress REST API? I'm going to read that again. When registering a custom post type with the register type function, which is the argument that needs to be set to true to include the custom post type in the WordPress REST API? The four options I'm going to give you are either enable REST API, enable REST or enable underscore REST, show in REST API, that should be sorry, not EO, but show in REST API. Let me copy paste that again. So show in REST API is the third option or just the word show in REST. So which of those four options is the argument that needs to be set to true to include the custom post type in the WordPress REST API? Enable underscore REST API, REST underscore API, enable underscore REST, show underscore in underscore REST underscore API. I had saying all those underscores or finally the show underscore in underscore REST argument. So while we're doing that, let's go and have a look for the register post type function. So we can see all the arguments that need to be set. Write down your answer if you have it. And I'm going to switch over to developer docs. And here is register post type. And the answer for this one is the let's go down here. It's the show in REST option. So show in REST, if you set it to true, it decides whether or not to accuse the post type in the REST API, set this to true for the post type to be available in the block editor. So what that will then do is that if you make a request to that post type slug, you will see a list of all of those, all of those custom post types. So show in REST is the right answer. If you got that one right, give yourself a point and then total up your points for round four. And then let me know what you got for round four. So Stuart got four, Ben got four, Shamali got three, Dribble got three, and Adrian, I'm still waiting for another issue, three out of five, Adrian got three as well. Excellent. Good job. Now while you're there, let's total up our scores for all 21 questions, because I thought they were 20, but there was an extra one. So total up your scores for all 21. And then let me know what you got out of 21 for today's quiz. I want to see if we have one or more winners today. So Dribble had 15, Stuart had 15, Shamali had 14, these are all very good scores, folks. Ben had 12, Adrian saw the record, I did much better in real school. Quizzes are super difficult because they're kind of at the last minutes and you don't have the docs handy. So of the folks that have posted their results here, it looks like we have Dribble and Stuart as our winners today with 15 out of 21 each. I don't see anybody else posting their scores. So it looks like those are our winners today. So well done. You can claim rights to being the lone WordPress developer quiz champions. I wish I had a little Tadar noise to play or a cheering or a clapping, but find yourself some sounds of people cheering. Think about people cheering and clapping. Well done to the two of you. Here we go. Do the Tadar noise and at least the emoticon. Well done to everybody. Awesome. I hope this was fun. I hope you enjoyed this. I like doing quizzes like this every now and then because it's something different that forces me to go down rabbit holes and go and learn things and do things. If you are watching this on WordPress TV, I hope you did it along with us and let me know what your score is in the comments. I'd love to hear if anybody got higher than 15. So if you're on WordPress TV watching this, let us know in the comments what your score was. Thank you, Adrian. I'm glad you enjoyed it. It's one of those cheat workshops that I do when I have no time to prepare anything else because I only have a few days of work. Then I'll do something like this just for random fun. Okay, next week we'll be back to doing more developer focused topics. I haven't quite looked at my notes for next week yet, but I will post the new workshop very soon, probably on Monday. I hope you enjoyed today's score. If you're one of the folks, Stuart and Druval, who got 15 out of 20, you have epic bragging rights. I hope you will join me for the next quiz we do this time next year. But otherwise, thank you all for joining me today. Thank you all for playing along with me. I hope you enjoy the rest of your Thursday and the rest of your week and your weekend, and I will see you all again next week. Bye. Thanks, Adrian. Thanks, Oliver. Thank you. I'm trying to remember how this works now. Thank you. Thank you.