- Timestamp:
- 10/27/2022 04:37:55 PM (2 years ago)
- Location:
- branches/6.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1
-
branches/6.1/src/wp-includes/class-wp-theme-json-resolver.php
r54517 r54707 423 423 ), 424 424 ); 425 426 $cache_key = sprintf( 'wp_global_styles_%s', md5( serialize( $args ) ) );427 $post_id = (int) get_transient( $cache_key );428 // Special case: '-1' is a results not found.429 if ( -1 === $post_id && ! $create_post ) {430 return $user_cpt;431 }432 433 if ( $post_id > 0 && in_array( get_post_status( $post_id ), (array) $post_status_filter, true ) ) {434 return get_post( $post_id, ARRAY_A );435 }436 425 437 426 $global_style_query = new WP_Query(); … … 457 446 } 458 447 } 459 $cache_expiration = $user_cpt ? DAY_IN_SECONDS : HOUR_IN_SECONDS;460 set_transient( $cache_key, $user_cpt ? $user_cpt['ID'] : -1, $cache_expiration );461 448 462 449 return $user_cpt;
Note: See TracChangeset
for help on using the changeset viewer.