diff --git a/lib/compat/wordpress-6.2/get-global-styles-and-settings.php b/lib/compat/wordpress-6.2/get-global-styles-and-settings.php index 79e5f956af907..5d37d3182ccc8 100644 --- a/lib/compat/wordpress-6.2/get-global-styles-and-settings.php +++ b/lib/compat/wordpress-6.2/get-global-styles-and-settings.php @@ -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 ) {