[wp-trac] [WordPress Trac] #14170: Problems with network activation

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 28 00:56:42 UTC 2010


#14170: Problems with network activation
--------------------------+-------------------------------------------------
 Reporter:  scribu        |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  high          |   Milestone:  3.1      
Component:  Multisite     |     Version:           
 Severity:  major         |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by coolmann):

 Which, in other words, means that plugin developers will have to continue
 using this code when a new blog is created and the plugin is "network
 activated", right? Just trying to understand. Thank you.


 {{{
 // Make WP SlimStat multi-site aware
 add_action( 'wpmu_new_blog', array( &$wp_slimstat,'new_blog_activate'),
 10, 6);
 function new_blog_activate(){
         global $wpdb;
         if (is_plugin_active_for_network('path_to_plugin')){
                 $old_blog = $wpdb->blogid;
                 switch_to_blog($blog_id);
                 _single_blog_activate();
                 switch_to_blog($old_blog);
         }
 }

 }}}

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


More information about the wp-trac mailing list