This entry is part 12 of 14 in the Plugin Development 101 Series
- Introduction to WordPress Plugin Development 101
- Plugin Development 101 – What Makes a Plugin?
- Plugin Development 101 – General Best Practices
- Plugin Development 101 – An Intro to Filters
- Plugin Development 101 – Intro to Actions
- Plugin Development 101 – Registering a Custom Post Type
- Plugin Development 101 – Intro to Short Codes
- Plugin Development 101 – Intro to Loading Scripts and Styles
- Plugin Development 101 – Introduction to Adding Dashboard Menus
- Plugin Development 101 – Separating Your Plugin into Multiple Files
- Plugin Development 101 – Your First OOP Plugin
- Plugin Development 101 – Dissecting the Featured Comments Plugin
- Plugin Development 101 – Digging Into WordPress Core to Solve a Problem
- Plugin Development 101 – Introduction to extending classes
One of the best ways to get better are writing plugins is to look at existing plugins and figure out how they work. In this part of Plugin Development 101 we are going to look at the Featured Comments and dissect it line-by-line in order to learn exactly how the plugin works. It is a relatively simple plugin and will serve as an excellent example since illustrates an implementation of several of the primary topics we have already discussed in this series.
The entire code for Featured Comments can be viewed on WordPress.org.
I like the build it as we go tutorials. Talking through existing code is not a win for my learning style.
Thanks for the feedback. I believe that looking at how existing projects are done is exceptionally valuable. If you’re a WP plugin developer, one of the best things you can do is dissect WordPress core. This is the same concept.
Hi Pippin
I think that’s a really too big step compare with the rate of the precedent ones.
Sorry for the delay, your comment got flagged as spam. Are there certain aspects of the plugin you had questions about?
When you have made a plugin, how you maintain them so they work when wordpress doing an update?
It’s important to continually use and test your plugin so that you can be sure it continues to work properly with new updates.
When plugins are built properly, they very rarely break due to a WordPress core update, but by continually testing your plugin, you can ensure that you are aware of bugs when they appear.
Awesome tutorials so far… Would love to see more advance topic in plugin development..
BTW Utkarsh is an indian name… you can find how to pronounce and more about it here http://www.namesetc.org/en/Utkarsh
Hi Pippin,
At 4:25 you say ‘ it is using a single…’ I’m sorry but I can’t understand what you describe as single. I think it’s your American accent, which I am not used to. Could you please just elaborate on this for me? Thanks.
Hi Matthew! Not a problem at all. I was referring to a PHP Singleton.
Hello Pippin,
Thanks for the tutorial. It really helps. I am curious with “moderate_comments”. Is that an ability of a user?
Is there any other ability that user might have? Where can I see it in the code?
If I make a plugin then want to add new ability to specific user. How can I do that?
Thanks!
It’s a capability assigned to some users. See the Codex page on capabilities for more information: https://codex.wordpress.org/Roles_and_Capabilities
Hi Pippin,
thank you for the tutorial. I think tutorials like this one are very useful for understanding how real life functioning plugins actually work. This video will take a couple of viewings, maybe even more, to understand it really well. The explanations you provide on how the logic works and how it does what it does are really helpful.
A few more of these walkthroughs, of increasing complexity will certainly be welcome and a big push for beginning plugin developers to understand the mechanics of working plugins.
Hi Pippin,
I loved the previous lectures about plugins development, but this one threw me off quite a bit. I’m a beginner at plugin development and this lecture was quite confusing for me. Personally, I felt like this was aimed towards the more advanced plugin developers.
Khoi,
Is there anything in particular about this video you found difficult? I’d love to hear it if so!
Hi Pippin,
I didn’t have much experience with OOP with PHP so I didn’t quite understand most of the stuff explained in this video. I believe I just need to educate myself further with PHP and OOP PHP in order to grasp all of the aspects of this tutorial.