[wp-trac] [WordPress Trac] #11308: Handling plugin dependencies

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 28 15:05:23 UTC 2010


#11308: Handling plugin dependencies
-------------------------+--------------------------------------------------
 Reporter:  apeatling    |       Owner:  westi  
     Type:  enhancement  |      Status:  new    
 Priority:  normal       |   Milestone:  3.0    
Component:  Plugins      |     Version:         
 Severity:  normal       |    Keywords:  plugins
-------------------------+--------------------------------------------------

Comment(by apeatling):

 So it's possible to do this at the top of every BuddyPress plugin:

 {{{
 /* Make sure BuddyPress is loaded */
 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
 if ( is_plugin_active( 'buddypress/bp-loader.php' ) )
         require_once ( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
 else
         // Display an error message
 }}}

 But this is going to be slow. If I have twenty BP plugin active, then
 that's twenty calls to require_once() which is not ideal.

 There must be a better way to handle this?

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


More information about the wp-trac mailing list