[wp-trac] [WordPress Trac] #42511: register_activation_hook with MultiSite
WordPress Trac
noreply at wordpress.org
Sat Nov 11 10:54:25 UTC 2017
#42511: register_activation_hook with MultiSite
-----------------------------+-----------------------------
Reporter: tazotodua | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
I think, it will be good, if any parameter/method will be added with that
function, like:
{{{
register_activation_hook(__file__ ,'myFunc', $FORCE_MULTISITE_BLOGS =
true);
}}}
where the third parameter will indicate, if the activation happens in
Network (multisite) dashboard, then the plugin should be activated for
each sub-blog.
There is one problem:
{{{
define('variable_XYZ', home_url() );
function myFunc(){
update_option('smth', variable_XYZ );
}
}}}
so, if just "myFunc" will be executed in the loop for each sub-blog, then
there will be problems... So, I think, whole plugin should be "sandboxed"
(i dont know what termin should be used) and whole plugin activation
should happen for each sub-site, and not just "myFunc".
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42511>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list