[wp-trac] [WordPress Trac] #58405: Use is_block_theme in WP_Theme

WordPress Trac noreply at wordpress.org
Tue Jun 6 16:17:18 UTC 2023


#58405: Use is_block_theme in WP_Theme
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.3
Component:  Themes                               |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch needs-      |     Focuses:
  testing commit                                 |
-------------------------------------------------+-------------------------
Changes (by spacedmonkey):

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


Comment:

 In [changeset:"55885" 55885]:
 {{{
 #!CommitTicketReference repository="" revision="55885"
 Themes: Replace file_exists checks with call to is_block_theme method in
 WP_Theme class.

 In `WP_Theme` class, replace two calls to `file_exists` with a call to the
 method `is_block_theme`. This method `is_block_theme` does the same file
 exists check, but it then caches the result for improved performance.

 Props nihar007, spacedmonkey, mukesh27, costdev, juzar.
 Fixes #58405.
 }}}

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


More information about the wp-trac mailing list