Tag Archives | plugins

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 […]

Continue Reading