[wp-trac] [WordPress Trac] #58405: Use is_block_theme in WP_Theme
WordPress Trac
noreply at wordpress.org
Mon May 29 06:49:48 UTC 2023
#58405: Use is_block_theme in WP_Theme
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future
| Release
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch changes- | Focuses:
requested |
-------------------------------------------------+-------------------------
Description changed by mukesh27:
Old description:
> Hi there!
>
> Thank you both for the PR and patch.
>
> @nihar007, in your patch, did you take a different approach than PR 4514
> ([https://github.com/WordPress/wordpress-develop/pull/4514])? Instead of
> adding a duplicate patch, please review the PR and provide your feedback
> on it. Thank you!
New description:
In line of 366 / 367 of the `WP_Theme` class, there are manual calls to if
files exists. However, in this context we can use the method
`is_block_theme`. This remove repeated code and hit an existing cache.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58405#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list