[wp-trac] [WordPress Trac] #15536: Introduce register_plugin

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 22 09:44:11 UTC 2010


#15536: Introduce register_plugin
-------------------------+--------------------------------------------------
 Reporter:  filosofo     |       Owner:  filosofo        
     Type:  enhancement  |      Status:  new             
 Priority:  normal       |   Milestone:  Future Release  
Component:  Plugins      |     Version:                  
 Severity:  normal       |    Keywords:  has-patch, close
-------------------------+--------------------------------------------------

Comment(by westi):

 For a non-static class it is just as simple:

 {{{
 add_action('plugins_loaded', create_function('','global
 $my_plugin_instance; $my_plugin_instance = new My_Plugin();'));
 }}}

 You don't nee d a global scope function for this

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15536#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list