2020-07-01 08:29:03 -04:00
|
|
|
<?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';
|
2022-04-12 11:12:47 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/avatar.php';
|
2020-07-01 08:29:03 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/block.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/calendar.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/categories.php';
|
2022-04-12 11:12:47 -04:00
|
|
|
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';
|
2022-04-26 09:42:07 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/comments-title.php';
|
2022-04-19 07:37:12 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/cover.php';
|
2021-05-07 07:48:27 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/file.php';
|
2021-12-13 20:57:26 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/gallery.php';
|
2022-04-12 11:12:47 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/home-link.php';
|
2021-12-13 20:57:26 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/image.php';
|
2020-07-01 08:29:03 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/latest-comments.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/latest-posts.php';
|
2021-05-25 04:40:25 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/legacy-widget.php';
|
2021-05-19 11:09:27 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/loginout.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/navigation-link.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/navigation-submenu.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/navigation.php';
|
2021-06-08 14:13:01 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/page-list.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/pattern.php';
|
2022-04-12 11:12:47 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/post-author-biography.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/post-author.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/post-comments.php';
|
2022-04-26 09:42:07 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/post-comments-form.php';
|
2021-05-19 11:09:27 -04:00
|
|
|
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';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/post-navigation-link.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/post-template.php';
|
2021-05-19 11:09:27 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/post-terms.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/post-title.php';
|
2022-04-12 11:12:47 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/query-no-results.php';
|
2021-05-19 11:09:27 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/query-pagination-next.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/query-pagination-numbers.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/query-pagination-previous.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/query-pagination.php';
|
2021-05-19 11:09:27 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/query-title.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/query.php';
|
2022-04-12 11:12:47 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/read-more.php';
|
2020-07-01 08:29:03 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/rss.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/search.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/shortcode.php';
|
2021-06-08 04:27:58 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/site-logo.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/site-tagline.php';
|
2021-05-19 11:09:27 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/site-title.php';
|
2020-07-01 08:29:03 -04:00
|
|
|
require ABSPATH . WPINC . '/blocks/social-link.php';
|
|
|
|
require ABSPATH . WPINC . '/blocks/tag-cloud.php';
|
2021-11-08 18:10:59 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/template-part.php';
|
2021-11-08 21:17:17 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/term-description.php';
|
2022-02-15 04:58:04 -05:00
|
|
|
require ABSPATH . WPINC . '/blocks/widget-group.php';
|
2020-07-01 08:29:03 -04:00
|
|
|
|
2020-07-02 13:22:03 -04:00
|
|
|
/**
|
|
|
|
* 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',
|
2022-07-02 10:35:14 -04:00
|
|
|
'comments-query-loop',
|
2020-10-19 16:57:07 -04:00
|
|
|
'embed',
|
2021-01-27 21:04:13 -05:00
|
|
|
'freeform',
|
2020-07-02 13:22:03 -04:00
|
|
|
'group',
|
|
|
|
'heading',
|
|
|
|
'html',
|
|
|
|
'list',
|
|
|
|
'media-text',
|
|
|
|
'missing',
|
|
|
|
'more',
|
|
|
|
'nextpage',
|
|
|
|
'paragraph',
|
|
|
|
'preformatted',
|
|
|
|
'pullquote',
|
|
|
|
'quote',
|
|
|
|
'separator',
|
|
|
|
'social-links',
|
|
|
|
'spacer',
|
|
|
|
'table',
|
|
|
|
'text-columns',
|
|
|
|
'verse',
|
|
|
|
'video',
|
2020-07-01 08:29:03 -04:00
|
|
|
);
|
2020-07-02 13:22:03 -04:00
|
|
|
|
|
|
|
foreach ( $block_folders as $block_folder ) {
|
2021-05-19 09:52:00 -04:00
|
|
|
register_block_type(
|
2020-07-02 13:22:03 -04:00
|
|
|
ABSPATH . WPINC . '/blocks/' . $block_folder
|
|
|
|
);
|
|
|
|
}
|
2020-07-01 08:29:03 -04:00
|
|
|
}
|
2020-07-02 13:22:03 -04:00
|
|
|
add_action( 'init', 'register_core_block_types_from_metadata' );
|