Editor: Correctly register the dynamic Cover block

The new "Featured Image" enhancement is handled dynamically, so we need to update how the Cover block is handled in the build processa and registered in the code.

Props ironprogrammer, costdev, Mamaduka, chaion07.
Fixes .



git-svn-id: https://develop.svn.wordpress.org/trunk@53212 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Greg Ziółkowski 2022-04-19 11:35:50 +00:00
parent 87dc304715
commit 8fafc11932
3 changed files with 3 additions and 2 deletions
src/wp-includes/blocks
tests/phpunit/includes
tools/webpack

@ -21,6 +21,7 @@ require ABSPATH . WPINC . '/blocks/comments-pagination-next.php';
require ABSPATH . WPINC . '/blocks/comments-pagination-numbers.php';
require ABSPATH . WPINC . '/blocks/comments-pagination-previous.php';
require ABSPATH . WPINC . '/blocks/comments-pagination.php';
require ABSPATH . WPINC . '/blocks/cover.php';
require ABSPATH . WPINC . '/blocks/file.php';
require ABSPATH . WPINC . '/blocks/gallery.php';
require ABSPATH . WPINC . '/blocks/home-link.php';
@ -79,7 +80,6 @@ function register_core_block_types_from_metadata() {
'code',
'column',
'columns',
'cover',
'embed',
'freeform',
'group',

@ -317,6 +317,7 @@ function _unhook_block_registration() {
remove_action( 'init', 'register_block_core_comments_pagination_next' );
remove_action( 'init', 'register_block_core_comments_pagination_numbers' );
remove_action( 'init', 'register_block_core_comments_pagination_previous' );
remove_action( 'init', 'register_block_core_cover' );
remove_action( 'init', 'register_block_core_file' );
remove_action( 'init', 'register_block_core_gallery' );
remove_action( 'init', 'register_block_core_home_link' );

@ -37,6 +37,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
'comments-pagination-next',
'comments-pagination-numbers',
'comments-pagination-previous',
'cover',
'file',
'gallery',
'home-link',
@ -87,7 +88,6 @@ module.exports = function( env = { environment: 'production', watch: false, buil
'column',
'columns',
'comments-query-loop',
'cover',
'embed',
'freeform',
'group',