[wp-trac] [WordPress Trac] #39318: Assign a theme when creating a site (Multisite)

WordPress Trac noreply at wordpress.org
Mon Apr 9 20:23:19 UTC 2018


#39318: Assign a theme when creating a site (Multisite)
-------------------------------------+------------------------------
 Reporter:  Mista-Flo                |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Networks and Sites       |     Version:  3.0
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  multisite
-------------------------------------+------------------------------

Comment (by flixos90):

 Replying to [comment:10 Mista-Flo]:
 > Except about the "In line 78, the site should not be enabled on the
 network, but on the new site. Enabling it for the entire network would be
 unexpected."
 >
 > Are you sure you can use a theme on a site whereas its not network
 enabled ? I'm not sure about this.

 Themes can also be enabled per site, via the ''Edit Site > Themes'' area.
 They are stored in an `allowedthemes` option (see
 https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes
 /class-wp-theme.php#L1414 for more). When you set a theme for a site, you
 wouldn't expect it to suddenly work for every network - it only implies
 you want to have it for the one site.

 I think we need to implement methods `WP_Theme::site_enable_theme(
 $stylesheets, $site_id )` and `WP_Theme::site_disable_theme( $stylesheets,
 $site_id )`. That should happen in a separate ticket though. When that is
 done, we can complete work on this one here. Everything else in this
 ticket here is ready.

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


More information about the wp-trac mailing list