[wp-trac] [WordPress Trac] #63086: Customizer: notice errror regarding WP_Theme::is_block_theme
WordPress Trac
noreply at wordpress.org
Tue Mar 18 12:28:33 UTC 2025
#63086: Customizer: notice errror regarding WP_Theme::is_block_theme
-------------------------------------------------+-------------------------
Reporter: wildworks | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.8
Component: Customize | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-testing-info has-patch dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Changes (by joemcgill):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"60037" 60037]:
{{{
#!CommitTicketReference repository="" revision="60037"
Themes: Improve error notice when `wp_is_block_theme()` is called too
early.
This is a follow-up to [59968] which improves error handling for when
`wp_is_block_theme()` is called too early. Initially, `_doing_it_wrong()`
was called in `WP_Theme::is_block_theme()` was called prior to themes
being set up, in order to avoid the bug reported in #63062, where doing so
would cause parent themes to not be resolved. After further investigation,
the issue is only caused by calling `wp_is_block_theme()` before the root
theme directory has been registered (e.g., when called on the
`muplugins_loaded` hook).
Moving This error message to `wp_is_block_theme()` when
`$GLOBALS['wp_theme_directories']` is empty avoids unnecessary error
messages.
Props wildworks, sukhendu2002, SirLouen, dinhtungdu, narenin, joemcgill,
peterwilsoncc, afragen.
Fixes #63086. See #63062.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63086#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list