Skip to content

Commit

Permalink
Remove filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtr committed Nov 22, 2022
1 parent 8f642a4 commit 2b16326
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions lib/compat/wordpress-6.2/get-global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,10 @@ function _wp_theme_has_theme_json_clean_cache_upon_upgrading_active_theme( $upgr
* @return string Stylesheet.
*/
function gutenberg_get_global_stylesheet( $types = array() ) {
/**
* Filters whether the cached global stylesheet can be used.
*
* @param boolean $can_use_cached Whether the cached global stylesheet can be used.
*/
$can_use_cached = apply_filters(
'wp_get_global_stylesheet_can_use_cache',
( empty( $types ) ) &&
// Ignore cache when `WP_DEBUG` is enabled, so it doesn't interfere with the theme developers workflow.
( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG )
);
$cache_key = 'gutenberg_get_global_stylesheet';
$cache_group = 'theme_json';
// Ignore cache when `WP_DEBUG` is enabled, so it doesn't interfere with the theme developers workflow.
$can_use_cached = empty( $types ) && ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG );
$cache_key = 'gutenberg_get_global_stylesheet';
$cache_group = 'theme_json';
if ( $can_use_cached ) {
$cached = wp_cache_get( $cache_key, $cache_group );
if ( $cached ) {
Expand Down

0 comments on commit 2b16326

Please sign in to comment.