[wp-trac] [WordPress Trac] #39318: Assign a theme when creating a site (Multisite)
WordPress Trac
noreply at wordpress.org
Tue Apr 3 14:03:42 UTC 2018
#39318: Assign a theme when creating a site (Multisite)
-------------------------------------------------+-------------------------
Reporter: Mista-Flo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Networks and Sites | Review
Severity: normal | Version: 3.0
Keywords: has-patch needs-testing dev- | Resolution:
feedback | Focuses: multisite
-------------------------------------------------+-------------------------
Comment (by flixos90):
I just reviewed [attachment:39318.2.patch]. Some notes:
* Let's not rely on #13743 here. It's not necessary for this feature to
work, we can use `WP_DEFAULT_THEME` for now. Once #13743 gets ready, we
simply need to update the code.
* If the theme requested doesn't exist (see line 68), nothing should
change from the current behavior. I recommend you wrap all the following
code that eventually updates the `$meta` array into a conditional that
only runs if `$theme->exists()`. In other words: Keep `$meta` the `public`
flag only in case the requested theme doesn't exist, only set `stylesheet`
and `template` if it ''does'' exist. Alternatively, we might wanna
`wp_die()` with an error, but since providing the theme is not crucial,
I'm not sure we need to do that.
* A minor suggestion: Your patch is not wrong there at all, but in line
304 and following, I think it's better readable to not use `printf()` and
instead output HTML directly. Same for the select tag itself, it should
not be echoed, but directly outputted as HTML.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39318#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list