[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
Wed Jan 18 19:16:46 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:  has-patch has-unit-tests commit      |     Focuses:
  dev-feedback                                   |  performance
-------------------------------------------------+-------------------------

Comment (by Otto42):

 @costdev I doubt it's going to be quite that simple.

 wp_start_object_cache uses the filter functions to determine whether to
 load an external cache. But those functions are noop'd here, by the wp-
 admin/includes/noop.php. So it won't load the cache, if the cache is
 external.

 The purpose of load-styles and load-scripts is to get the styles and
 scripts output without loading the overhead of loading all of WordPress.
 To get the cache functions working properly, you have to load a hell of a
 lot of WordPress.

 So the question is, is this overhead worth it? Or the alternative is to
 simply remove the use of caching functions from this change.

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


More information about the wp-trac mailing list