[wp-trac] [WordPress Trac] #47299: Site Health: get_test_theme_version() + WP_DEFAULT_THEME = use get_core_default_theme() !

WordPress Trac noreply at wordpress.org
Thu May 16 23:20:44 UTC 2019


#47299: Site Health: get_test_theme_version() + WP_DEFAULT_THEME = use
get_core_default_theme() !
-------------------------+-------------------------------------------------
 Reporter:  juliobox     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:               |    Version:  5.2
  Administration         |   Keywords:  needs-patch dev-feedback 2nd-
 Severity:  minor        |  opinion
  Focuses:               |
-------------------------+-------------------------------------------------
 Hello there

 The test for get_test_theme_version() is checking if WP_DEFAULT_THEME is
 set to one of our installed theme. If not, the SH will tell us to use one.
 But since I have a twentystuff theme on my installation, WordPress will
 find a fallback. Thanks to get_core_default_theme()!

 We should also use this as a check.
 I just did this:
 {{{#!php
 <?php
 if ( ! $has_default_theme ) {
 }}}
 becomes:
 {{{#!php
 <?php
 if ( ! $has_default_theme && ! WP_Theme::get_core_default_theme() ) {
 }}}

 That does the correct test I guess.

 Thank you!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47299>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list