[wp-trac] [WordPress Trac] #33835: action switch_theme, after_switch_theme should not be trigged when switch_theme for child site.
WordPress Trac
noreply at wordpress.org
Fri Sep 11 17:12:34 UTC 2015
#33835: action switch_theme, after_switch_theme should not be trigged when
switch_theme for child site.
--------------------------------+-----------------------------
Reporter: nguyenvanduocit | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 4.3
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
If you hook to after_switch_theme ( on network's theme ) for initialize
some default values, then your switch theme for child site by this line :
{{{
switch_to_blog( $child_site_Id );
switch_theme( $new_theme_name );
restore_current_blog();
}}}
The hook after_switch_theme will be trigger on network's theme.
I think it is incorrect.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33835>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list