[wp-trac] [WordPress Trac] #58576: locate_template does not check to see site has parent theme.

WordPress Trac noreply at wordpress.org
Thu Aug 3 20:29:28 UTC 2023


#58576: locate_template does not check to see site has parent theme.
---------------------------------------------+--------------------------
 Reporter:  spacedmonkey                     |       Owner:  flixos90
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  6.4
Component:  Themes                           |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  good-first-bug has-patch commit  |     Focuses:  performance
---------------------------------------------+--------------------------
Changes (by flixos90):

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


Comment:

 In [changeset:"56357" 56357]:
 {{{
 #!CommitTicketReference repository="" revision="56357"
 Themes: Avoid unnecessary check whether parent template file exists when
 not using a child theme.

 Prior to this change, the `locate_template()` function would
 unconditionally check whether the relevant template file exists in the
 parent theme, which for sites not using a child theme is an exact
 duplicate of the previous check. This is wasteful and has a small impact
 on performance since `file_exists()` checks have a cost.

 Props nihar007, thekt12, spacedmonkey, mukesh27.
 Fixes #58576.
 }}}

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


More information about the wp-trac mailing list