[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
Mon Jan 23 09:37:53 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):

 > I would say to change the run ordering so that it happens after those
 theme hooks. Why would it run before those hooks if you're changing the
 theme? Do you need to know of the theme.json files existence on a theme
 you're switching away from?

 From memory, a few use cases were the customizer and the theme directory.
 These were some that prompted people to add hooks to clear the cache
 (there were none at the beginning), so I'm not sure how feasible is that
 suggestion. I also don't feel comfortable having a cached function that
 requires people to know when they can use it and when they cannot. I'd
 rather have a reliable one that works in all scenarios.

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


More information about the wp-trac mailing list