Changeset 52676 for trunk/src/wp-includes/global-styles-and-settings.php
- Timestamp:
- 02/04/2022 02:17:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/global-styles-and-settings.php
r52675 r52676 113 113 } 114 114 115 // If variables are part of the stylesheet, 116 // we add them for all origins (default, theme, user). 117 // This is so themes without a theme.json still work as before 5.9: 118 // they can override the default presets. 119 // See https://core.trac.wordpress.org/ticket/54782 115 /* 116 * If variables are part of the stylesheet, 117 * we add them for all origins (default, theme, user). 118 * This is so themes without a theme.json still work as before 5.9: 119 * they can override the default presets. 120 * See https://core.trac.wordpress.org/ticket/54782 121 */ 120 122 $styles_variables = ''; 121 if ( in_array( 'variables', $types ) ) {123 if ( in_array( 'variables', $types, true ) ) { 122 124 $styles_variables = $tree->get_stylesheet( array( 'variables' ) ); 123 125 $types = array_diff( $types, array( 'variables' ) ); 124 126 } 125 127 126 // For the remaining types (presets, styles), we do consider origins: 127 // 128 // - themes without theme.json: only the classes for the presets defined by core 129 // - themes with theme.json: the presets and styles classes, both from core and the theme 128 /* 129 * For the remaining types (presets, styles), we do consider origins: 130 * 131 * - themes without theme.json: only the classes for the presets defined by core 132 * - themes with theme.json: the presets and styles classes, both from core and the theme 133 */ 130 134 $styles_rest = ''; 131 135 if ( ! empty( $types ) ) {
Note: See TracChangeset
for help on using the changeset viewer.