WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#47299 new enhancement

Site Health: get_test_theme_version() + WP_DEFAULT_THEME = use get_core_default_theme() !

Reported by: juliobox Owned by:
Milestone: 5.3 Priority: normal
Severity: minor Version: 5.2
Component: Administration Keywords: 2nd-opinion site-health has-patch
Focuses: Cc:

Description

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
if ( ! $has_default_theme ) {

becomes:

<?php
if ( ! $has_default_theme && ! WP_Theme::get_core_default_theme() ) {

That does the correct test I guess.

Thank you!

Attachments (1)

class-wp-site-health.php.patch (571 bytes) - added by ajayghaghretiya1 4 weeks ago.
updated the file with the patch, Also check class exist.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
4 weeks ago

  • Keywords site-health added

#2 @SergeyBiryukov
4 weeks ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 5.3

Makes sense to me, populate_options() and validate_current_theme() do the same.

@ajayghaghretiya1
4 weeks ago

updated the file with the patch, Also check class exist.

#3 @audrasjb
4 weeks ago

  • Keywords has-patch added; needs-patch removed
Note: See TracTickets for help on using tickets.