mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-29 23:09:44 +01:00
87207e9ca5
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 #55580. Built from https://develop.svn.wordpress.org/trunk@53212 git-svn-id: http://core.svn.wordpress.org/trunk@52801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
113 lines
4.0 KiB
PHP
113 lines
4.0 KiB
PHP
<?php
|
|
/**
|
|
* Used to set up all core blocks used with the block editor.
|
|
*
|
|
* @package WordPress
|
|
*/
|
|
|
|
// Include files required for core blocks registration.
|
|
require ABSPATH . WPINC . '/blocks/archives.php';
|
|
require ABSPATH . WPINC . '/blocks/avatar.php';
|
|
require ABSPATH . WPINC . '/blocks/block.php';
|
|
require ABSPATH . WPINC . '/blocks/calendar.php';
|
|
require ABSPATH . WPINC . '/blocks/categories.php';
|
|
require ABSPATH . WPINC . '/blocks/comment-author-name.php';
|
|
require ABSPATH . WPINC . '/blocks/comment-content.php';
|
|
require ABSPATH . WPINC . '/blocks/comment-date.php';
|
|
require ABSPATH . WPINC . '/blocks/comment-edit-link.php';
|
|
require ABSPATH . WPINC . '/blocks/comment-reply-link.php';
|
|
require ABSPATH . WPINC . '/blocks/comment-template.php';
|
|
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';
|
|
require ABSPATH . WPINC . '/blocks/image.php';
|
|
require ABSPATH . WPINC . '/blocks/latest-comments.php';
|
|
require ABSPATH . WPINC . '/blocks/latest-posts.php';
|
|
require ABSPATH . WPINC . '/blocks/legacy-widget.php';
|
|
require ABSPATH . WPINC . '/blocks/loginout.php';
|
|
require ABSPATH . WPINC . '/blocks/navigation-link.php';
|
|
require ABSPATH . WPINC . '/blocks/navigation-submenu.php';
|
|
require ABSPATH . WPINC . '/blocks/navigation.php';
|
|
require ABSPATH . WPINC . '/blocks/page-list.php';
|
|
require ABSPATH . WPINC . '/blocks/pattern.php';
|
|
require ABSPATH . WPINC . '/blocks/post-author-biography.php';
|
|
require ABSPATH . WPINC . '/blocks/post-author.php';
|
|
require ABSPATH . WPINC . '/blocks/post-comments.php';
|
|
require ABSPATH . WPINC . '/blocks/post-content.php';
|
|
require ABSPATH . WPINC . '/blocks/post-date.php';
|
|
require ABSPATH . WPINC . '/blocks/post-excerpt.php';
|
|
require ABSPATH . WPINC . '/blocks/post-featured-image.php';
|
|
require ABSPATH . WPINC . '/blocks/post-navigation-link.php';
|
|
require ABSPATH . WPINC . '/blocks/post-template.php';
|
|
require ABSPATH . WPINC . '/blocks/post-terms.php';
|
|
require ABSPATH . WPINC . '/blocks/post-title.php';
|
|
require ABSPATH . WPINC . '/blocks/query-no-results.php';
|
|
require ABSPATH . WPINC . '/blocks/query-pagination-next.php';
|
|
require ABSPATH . WPINC . '/blocks/query-pagination-numbers.php';
|
|
require ABSPATH . WPINC . '/blocks/query-pagination-previous.php';
|
|
require ABSPATH . WPINC . '/blocks/query-pagination.php';
|
|
require ABSPATH . WPINC . '/blocks/query-title.php';
|
|
require ABSPATH . WPINC . '/blocks/query.php';
|
|
require ABSPATH . WPINC . '/blocks/read-more.php';
|
|
require ABSPATH . WPINC . '/blocks/rss.php';
|
|
require ABSPATH . WPINC . '/blocks/search.php';
|
|
require ABSPATH . WPINC . '/blocks/shortcode.php';
|
|
require ABSPATH . WPINC . '/blocks/site-logo.php';
|
|
require ABSPATH . WPINC . '/blocks/site-tagline.php';
|
|
require ABSPATH . WPINC . '/blocks/site-title.php';
|
|
require ABSPATH . WPINC . '/blocks/social-link.php';
|
|
require ABSPATH . WPINC . '/blocks/tag-cloud.php';
|
|
require ABSPATH . WPINC . '/blocks/template-part.php';
|
|
require ABSPATH . WPINC . '/blocks/term-description.php';
|
|
require ABSPATH . WPINC . '/blocks/widget-group.php';
|
|
|
|
/**
|
|
* Registers core block types using metadata files.
|
|
* Dynamic core blocks are registered separately.
|
|
*
|
|
* @since 5.5.0
|
|
*/
|
|
function register_core_block_types_from_metadata() {
|
|
$block_folders = array(
|
|
'audio',
|
|
'button',
|
|
'buttons',
|
|
'code',
|
|
'column',
|
|
'columns',
|
|
'embed',
|
|
'freeform',
|
|
'group',
|
|
'heading',
|
|
'html',
|
|
'list',
|
|
'media-text',
|
|
'missing',
|
|
'more',
|
|
'nextpage',
|
|
'paragraph',
|
|
'preformatted',
|
|
'pullquote',
|
|
'quote',
|
|
'separator',
|
|
'social-links',
|
|
'spacer',
|
|
'table',
|
|
'text-columns',
|
|
'verse',
|
|
'video',
|
|
);
|
|
|
|
foreach ( $block_folders as $block_folder ) {
|
|
register_block_type(
|
|
ABSPATH . WPINC . '/blocks/' . $block_folder
|
|
);
|
|
}
|
|
}
|
|
add_action( 'init', 'register_core_block_types_from_metadata' );
|