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: public static function get_instance() { if ( ! isset( self::$_this ) ) { self::$_instance = new self;… Continue reading
Tag Archives: Singletons
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: