Changeset 52054 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 11/08/2021 09:44:12 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r52049 r52054 2304 2304 } 2305 2305 2306 $can_use_cache = ( 2307 ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) && 2308 ( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) && 2309 ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) && 2310 ! is_admin() 2311 ); 2312 2313 $stylesheet = null; 2314 $transient_name = 'global_styles_' . get_stylesheet(); 2315 2316 if ( $can_use_cache ) { 2317 $cache = get_transient( $transient_name ); 2318 if ( $cache ) { 2319 $stylesheet = $cache; 2320 } 2321 } 2322 2323 if ( null === $stylesheet ) { 2324 $theme_json = WP_Theme_JSON_Resolver::get_merged_data(); 2325 $stylesheet = $theme_json->get_stylesheet(); 2326 2327 if ( $can_use_cache ) { 2328 set_transient( $transient_name, $stylesheet, MINUTE_IN_SECONDS ); 2329 } 2330 } 2306 $stylesheet = wp_get_global_stylesheet(); 2331 2307 2332 2308 if ( empty( $stylesheet ) ) {
Note: See TracChangeset
for help on using the changeset viewer.