[wp-trac] [WordPress Trac] #57629: Use `get_theme_file_path()` in `wp_theme_has_theme_json()`

WordPress Trac noreply at wordpress.org
Wed Jun 28 17:13:01 UTC 2023


#57629: Use `get_theme_file_path()` in `wp_theme_has_theme_json()`
------------------------------------+---------------------------
 Reporter:  flixos90                |       Owner:  spacedmonkey
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  6.3
Component:  Themes                  |     Version:
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+---------------------------
Changes (by spacedmonkey):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56094" 56094]:
 {{{
 #!CommitTicketReference repository="" revision="56094"
 Themes: Use improved support for child themes in
 `wp_theme_has_theme_json()`.

 Improve logic in `wp_theme_has_theme_json()`, to only check to see if
 theme.json exists in child theme, if the current theme is a child theme.
 Without this change, `file_exists` would be called twice on every request,
 which is wasteful.

 Follow up to [56085].

 Props spacedmonkey, SergeyBiryukov.
 Fixes #57629.
 }}}

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


More information about the wp-trac mailing list