Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,13 @@ public function get_assets( $request ) { // phpcs:ignore VariableAnalysis.CodeAn
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );

// Before block registration: `registerBlockType()` drops an unknown `category`.
wp_add_inline_script(
'wp-block-library',
'wp.blocks.setCategories(' . wp_json_encode( get_block_categories( new WP_Block_Editor_Context() ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');',
'before'
);

// Preload blocks - this creates inline scripts.
$server_block_settings = get_block_editor_server_block_settings();
wp_add_inline_script(
Expand Down
Loading