Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/wp-includes/global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ function wp_get_global_stylesheet( $types = array() ) {
( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) &&
( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) &&
( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) &&
! is_admin()
! is_admin() &&
/**
* Whether to enable the global styles stylesheet cache.
*
* @since 6.0.0
*
* @param bool $enable True to enable transient cache, false otherwise.
*/
apply_filters( 'global_styles_enable_cache', true )
);
$transient_name = 'global_styles_' . get_stylesheet();
if ( $can_use_cached ) {
Expand Down Expand Up @@ -165,7 +173,9 @@ function wp_get_global_styles_svg_filters() {
( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) &&
( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) &&
( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) &&
! is_admin()
! is_admin() &&
/** This filter is documented in wp-includes/global-styles-and-settings.php */
apply_filters( 'global_styles_enable_cache', true )
);
$transient_name = 'global_styles_svg_filters_' . get_stylesheet();
if ( $can_use_cached ) {
Expand Down