Reader Odai left a great question in his comment today on our plugin tutorial: Looking at the code for The Complete Plugin, do you need to have a closing ?> for the opening <?php? Or is it okay to just end with a }? I learned the answer to this a long time ago, so… Continue reading
Adding a Banner Image to your WordPress Plugin Page
As of December 2011 every plugin hosted on WordPress.org has the option to display a visually pleasing banner image at the top of its plugin page. If you are publishing a quick ad-hoc plugin you might not want to go to the effort, but for everyone else, especially plugins that represent a brand we consider… Continue reading
Submitting your Plugin for Hosting on WordPress.org
Our company builds custom WordPress plugins for clients to be published in the WordPress.org plugin repository. As we are about to publish another client plugin it's a great time to write about the processes for submitting a plugin to the WordPress plugin repository. Note this post is only about submitting your plugin; we'll cover actually… Continue reading
Initializing Singleton Classes used in WordPress Plugins
After one of our earlier posts Eric Mann whose opinion we highly respect initiated a conversation with me over Twitter’s DM where he expressed a dislike for the HardcoreWP approach and stated a preference for using ::get_instance() instead: While this approach is perfectly workable and truth be told it’s mostly just personal preference we still… Continue reading
Using Singleton Classes for WordPress Plugins
In our last post "Enabling Action and Filter Hook Removal from Class-based WordPress Plugins" we offered the following as a suggested template for coding WordPress plugins:
Enabling Action and Filter Hook Removal from Class-based WordPress Plugins
In our tutorial “Using Classes as Code Wrappers for WordPress Plugins” we took a plugin that used a global function for its filter hook and converted it to using a PHP class as a code wrapper. Unfortunately the approach we showed didn’t allow other plugins and/or themes to remove or chain the actions and/or filters… Continue reading
Using Classes as Code Wrappers for WordPress Plugins
Many tutorials that explain how to write a WordPress plugin (including ours) show the use of global functions for implementing action and filter hooks. In our case we used global functions so we had less to explain. But now that we’ve gotten past that first tutorial we think once you understand using classes you’ll find no… Continue reading
How to Write a Basic WordPress Plugin
Plugins for WordPress can be very elaborate and require significant programming expertise to develop. But learning to develop a WordPress plugin doesn’t have to be difficult; you can start small and grow your skills over time. Let’s start with a very simple WordPress plugin that you might build for yourself or a client. Name the Plugin… Continue reading