HOJWssP F !7VWW tWOW@@@ggxLOJW88+ + ++333+34443 0DD``yWMWP'`V&0NNYWMV0V'linux-gn7VWyWW`VOWWz30PN@NxPz340VzW VKa a H4*"hf"hu SW4V4WpSWҊ|W<WPWP4WsW$H8*W)WP,WP8WP,Wk as before 5.9: * they can override the default presets. * See https://core.trac.wordpress.org/ticket/54782 */ $styles_variables = ''; if ( in_array( 'variables', $types, true ) ) { $styles_variables = $tree->get_stylesheet( array( 'variables' ) ); $types = array_diff( $types, array( 'variables' ) ); } /* * For the remaining types (presets, styles), we do consider origins: * * - themes without theme.json: only the classes for the presets defined by core * - themes with theme.json: the presets and styles classes, both from core and the theme */ $styles_rest = ''; if ( ! empty( $types ) ) { $origins = array( 'default', 'theme', 'custom' ); if ( ! $supports_theme_json ) { $origins = array( 'default' ); } $styles_rest = $tree->get_stylesheet( $types, $origins ); } $stylesheet = $styles_variables . $styles_rest; if ( $can_use_cached ) { // Cache for a minute. // This cache doesn't need to be any longer, we only want to avoid spikes on high-traffic sites. set_transient( $transient_name, $stylesheet, MINUTE_IN_SECONDS ); } return $stylesheet; } /** * Returns a string containing the SVGs to be referenced as filters (duotone). * * @since 5.9.1 * * @return string */ function wp_get_global_styles_svg_filters() { // Return cached value if it can be used and exists. // It's cached by theme to make sure that theme switching clears the cache. $can_use_cached = ( ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) && ( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) && ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) && ! is_admin() ); $transient_name = 'global_styles_svg_filters_' . get_stylesheet(); if ( $can_use_cached ) { $cached = get_transient( $transient_name ); if ( $cached ) { return $cached; } } $supports_theme_json = WP_Theme_JSON_Resolver::theme_has_support(); $origins = array( 'default', 'theme', 'custom' ); if ( ! $supports_theme_json ) { $origins = array( 'default' ); } $tree = WP_Theme_JSON_Resolver::get_merged_data(); $svgs = $tree->get_svg_filters( $origins ); if ( $can_use_cached ) { // Cache for a minute, same as wp_get_global_stylesheet. set_transient( $transient_name, $svgs, MINUTE_IN_SECONDS ); } return $svgs; }