[wp-trac] [WordPress Trac] #43728: Implements site_enable_theme and site_disable_theme functions in WP_Theme class

WordPress Trac noreply at wordpress.org
Tue Apr 10 08:29:42 UTC 2018


#43728: Implements site_enable_theme and site_disable_theme functions in WP_Theme
class
-------------------------+------------------------------
 Reporter:  Mista-Flo    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  multisite
-------------------------+------------------------------

Comment (by swissspidy):

 Thinking out loud here:

 What about something like `WP_Site::enable_theme( WP_Theme $theme )`? and
 `WP_Network::enable_theme( WP_Theme $theme )` (or
 `WP_Network::enable_theme( string $stylesheet )`) instead of `WP_Theme::
 network_disable_theme( $stylesheets )`.

 Then you could just do `get_network()->enable_theme(…)` or
 `get_site()->enable_theme(…)`.

 The existing `WP_Theme` methods could be simple wrappers about the new
 ones.

 In other words, I think it's more of an action on the site/network instead
 of the theme.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43728#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list