[wp-trac] [WordPress Trac] #34306: Twenty Sixteen as default theme

WordPress Trac noreply at wordpress.org
Fri Nov 27 00:02:49 UTC 2015


#34306: Twenty Sixteen as default theme
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:  helen
     Type:  task (blessed)  |      Status:  closed
 Priority:  normal          |   Milestone:  4.4
Component:  Bundled Theme   |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:
----------------------------+---------------------

Comment (by nacin):

 @dd32:

 > * `validate_current_theme()` - Removed the checking for
 `WP_DEFAULT_THEME` from the Invalid/Valid if branches. This was no longer
 needed now that the function would conditionally set the default theme.

 Just writing to say I concur with this. Keeping the check in my patch was
 deliberate, primarily to track existing behavior and to also avoid the
 filesystem hit when you were using the default theme. That said,
 `validate_current_theme()` should actually validate the theme. And while
 it's in `wp-includes`, it's only used in the customizer and in the admin.
 And in both cases, we're hitting the filesystem anyway, both with
 `file_exists()` and actually reading `style.css` via `WP_Theme`, which is
 what we're doing here.

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


More information about the wp-trac mailing list