Rethinking Object-Oriented WordPress Plugins

Following common practice in WordPress plugin development, you create a class for you plugin, instantiate that class with a

$my_plugin = new My_Plugin();

in your main plugin file, and declare all your actions/filters in your class’s __construct() function, using something like:

add_filter('init', array($this, 'my_init_function'));

And then you go on to add your plugin’s JavaScript and CSS, register post types and taxonomies, look for query variables, etc.

I’m declaring that to be “wrong”, and I’m not going to do it anymore. Why? Because it’s not good objects-oriented design, and it seems to me that if you’re going to use objects, you should follow good object-oriented design patterns. Read More

WordPress for the End User – Part III: Writing Posts

This is a basic WordPress tutorial for end users. WordPress has many of capabilities but only a few areas are important for most end users. Part III will cover Writing Posts. See Part I for Adding Users and Part II for Adding Pages. Read More

WordPress for the End User – Part II: Adding Pages

This is a basic WordPress tutorial for end users. WordPress has many of capabilities but only a few areas are important for most end users. Part II will cover Adding Pages. See Part I for Adding Users and Part III for Writing Posts. Read More