PluginProbe
Gutenberg / 24.0.0
Gutenberg v24.0.0
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | lib/client-assets.php +7 -9 23.6.024.0.0 View file →
@@ -25,11 +25,11 @@
25 25 * Retrieves a URL to a file in the gutenberg plugin.
26 26 *
27 27 * @since 0.1.0
28 28 *
29 - * @param string $path Relative path of the desired file.
29 + * @param string $path Relative path of the desired file.
30 30 *
31 - * @return string Fully qualified URL pointing to the desired file.
31 + * @return string Fully qualified URL pointing to the desired file.
32 32 */
33 33 function gutenberg_url( $path ) {
34 34 return plugins_url( $path, __DIR__ );
35 35 }
@@ -124,10 +124,12 @@
124 124 // else (for development or test) default to use the current time.
125 125 $version = defined( 'GUTENBERG_VERSION' ) && ! SCRIPT_DEBUG ? GUTENBERG_VERSION : time();
126 126 $suffix = SCRIPT_DEBUG ? '' : '.min';
127 127
128 - // wp-components: add dashicons (icon font dependency)
129 - $styles->query( 'wp-components', 'registered' )->deps[] = 'dashicons';
128 + // wp-components: add dashicons (icon font dependency) and design tokens.
129 + $components_style = $styles->query( 'wp-components', 'registered' );
130 + $components_style->deps[] = 'dashicons';
131 + $components_style->deps[] = 'wp-theme';
130 132
131 133 // wp-edit-post: add wp-edit-blocks (custom handle not auto-inferred)
132 134 $styles->query( 'wp-edit-post', 'registered' )->deps[] = 'wp-edit-blocks';
133 135
@@ -142,12 +144,8 @@
142 144
143 145 // wp-customize-widgets: add wp-edit-blocks (custom handle not auto-inferred)
144 146 $styles->query( 'wp-customize-widgets', 'registered' )->deps[] = 'wp-edit-blocks';
145 147
146 - // Register wp-theme (Design System tokens from @wordpress/theme) as a
147 - // dependency of wp-base-styles so its `:root` token block loads
148 - // everywhere wp-base-styles does, including the editor iframe via
149 - // $wp_edit_blocks_dependencies below.
150 148 gutenberg_override_style(
151 149 $styles,
152 150 'wp-theme',
153 151 gutenberg_url( 'build/styles/theme/design-tokens' . $suffix . '.css' ),
@@ -162,9 +160,9 @@
162 160 gutenberg_override_style(
163 161 $styles,
164 162 'wp-base-styles',
165 163 gutenberg_url( 'build/styles/base-styles/admin-schemes' . $suffix . '.css' ),
166 - array( 'wp-theme' ),
164 + array(),
167 165 $version
168 166 );
169 167 $styles->add_data( 'wp-base-styles', 'rtl', 'replace' );
170 168 $styles->add_data( 'wp-base-styles', 'suffix', $suffix );