[wp-trac] [WordPress Trac] #14170: Problems with network activation
WordPress Trac
wp-trac at lists.automattic.com
Wed Oct 27 19:47:27 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 commit
--------------------------+-------------------------------------------------
Comment(by coolmann):
Replying to [comment:37 scribu]:
> (In [16021]) Trigger activation hooks for netork plugins when new site
is created. See #14170
I see. Good point. So, in other words, I can remove the following 'custom'
code from my plugins, am I right?
{{{
// 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);
}
}
}}}
This is now automatically done by Wordpress, with your patch, if I'm not
mistaken.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14170#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list