[wp-trac] [WordPress Trac] #56975: Replace the internal `WP_Theme_JSON_Resolver::theme_has_support()` with a public function

WordPress Trac noreply at wordpress.org
Sun Jan 22 12:23:32 UTC 2023


#56975: Replace the internal `WP_Theme_JSON_Resolver::theme_has_support()` with a
public function
-------------------------------------------------+-------------------------
 Reporter:  oandregal                            |       Owner:
                                                 |  hellofromTonya
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.2
Component:  Themes                               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback gutenberg-merge has-    |     Focuses:
  patch has-unit-tests has-testing-info          |  performance
-------------------------------------------------+-------------------------

Comment (by oandregal):

 > A static variable doesn't persist between runs. You don't need an extra
 parameter to clear it.

 What if the variable is initialized before a "change of theme" such as the
 `switch_theme` or `start_previewing_theme` hook? An easy way to see how it
 fails is by removing my last commit or removing and observing the dozens
 of PHP unit tests failures.

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


More information about the wp-trac mailing list