PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.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 All 404 releases
← All changes | lib/experimental/class-wp-rest-block-editor-settings-controller.php +10 -0 23.5.3 → 24.1.0 View file →
@@ -398,8 +398,18 @@
398 398 wp_enqueue_style( 'wp-block-library' );
399 399 wp_enqueue_style( 'wp-format-library' );
400 400 wp_enqueue_media();
401 401
402 + /*
403 + * Block style variations provided by the theme's theme.json
404 + * partials are registered lazily, when the theme JSON resolver
405 + * first runs in a request. Nothing has run it in this REST
406 + * request yet, so prime it — otherwise the block styles registry
407 + * is still empty when `enqueue_editor_block_styles_assets()`
408 + * serializes it into the `wp-block-styles` inline script below.
409 + */
410 + WP_Theme_JSON_Resolver_Gutenberg::get_theme_data();
411 +
402 412 do_action( 'enqueue_block_editor_assets' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
403 413
404 414 // Never allow old admin styles as a dependency.
405 415 wp_deregister_style( 'common' );