[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Used to set up all core blocks used with the block editor. 4 * 5 * @package WordPress 6 */ 7 8 // Include files required for core blocks registration. 9 require ABSPATH . WPINC . '/blocks/archives.php'; 10 require ABSPATH . WPINC . '/blocks/avatar.php'; 11 require ABSPATH . WPINC . '/blocks/block.php'; 12 require ABSPATH . WPINC . '/blocks/calendar.php'; 13 require ABSPATH . WPINC . '/blocks/categories.php'; 14 require ABSPATH . WPINC . '/blocks/comment-author-name.php'; 15 require ABSPATH . WPINC . '/blocks/comment-content.php'; 16 require ABSPATH . WPINC . '/blocks/comment-date.php'; 17 require ABSPATH . WPINC . '/blocks/comment-edit-link.php'; 18 require ABSPATH . WPINC . '/blocks/comment-reply-link.php'; 19 require ABSPATH . WPINC . '/blocks/comment-template.php'; 20 require ABSPATH . WPINC . '/blocks/comments-pagination-next.php'; 21 require ABSPATH . WPINC . '/blocks/comments-pagination-numbers.php'; 22 require ABSPATH . WPINC . '/blocks/comments-pagination-previous.php'; 23 require ABSPATH . WPINC . '/blocks/comments-pagination.php'; 24 require ABSPATH . WPINC . '/blocks/comments-title.php'; 25 require ABSPATH . WPINC . '/blocks/cover.php'; 26 require ABSPATH . WPINC . '/blocks/file.php'; 27 require ABSPATH . WPINC . '/blocks/gallery.php'; 28 require ABSPATH . WPINC . '/blocks/home-link.php'; 29 require ABSPATH . WPINC . '/blocks/image.php'; 30 require ABSPATH . WPINC . '/blocks/latest-comments.php'; 31 require ABSPATH . WPINC . '/blocks/latest-posts.php'; 32 require ABSPATH . WPINC . '/blocks/legacy-widget.php'; 33 require ABSPATH . WPINC . '/blocks/loginout.php'; 34 require ABSPATH . WPINC . '/blocks/navigation-link.php'; 35 require ABSPATH . WPINC . '/blocks/navigation-submenu.php'; 36 require ABSPATH . WPINC . '/blocks/navigation.php'; 37 require ABSPATH . WPINC . '/blocks/page-list.php'; 38 require ABSPATH . WPINC . '/blocks/pattern.php'; 39 require ABSPATH . WPINC . '/blocks/post-author-biography.php'; 40 require ABSPATH . WPINC . '/blocks/post-author.php'; 41 require ABSPATH . WPINC . '/blocks/post-comments.php'; 42 require ABSPATH . WPINC . '/blocks/post-comments-form.php'; 43 require ABSPATH . WPINC . '/blocks/post-content.php'; 44 require ABSPATH . WPINC . '/blocks/post-date.php'; 45 require ABSPATH . WPINC . '/blocks/post-excerpt.php'; 46 require ABSPATH . WPINC . '/blocks/post-featured-image.php'; 47 require ABSPATH . WPINC . '/blocks/post-navigation-link.php'; 48 require ABSPATH . WPINC . '/blocks/post-template.php'; 49 require ABSPATH . WPINC . '/blocks/post-terms.php'; 50 require ABSPATH . WPINC . '/blocks/post-title.php'; 51 require ABSPATH . WPINC . '/blocks/query-no-results.php'; 52 require ABSPATH . WPINC . '/blocks/query-pagination-next.php'; 53 require ABSPATH . WPINC . '/blocks/query-pagination-numbers.php'; 54 require ABSPATH . WPINC . '/blocks/query-pagination-previous.php'; 55 require ABSPATH . WPINC . '/blocks/query-pagination.php'; 56 require ABSPATH . WPINC . '/blocks/query-title.php'; 57 require ABSPATH . WPINC . '/blocks/query.php'; 58 require ABSPATH . WPINC . '/blocks/read-more.php'; 59 require ABSPATH . WPINC . '/blocks/rss.php'; 60 require ABSPATH . WPINC . '/blocks/search.php'; 61 require ABSPATH . WPINC . '/blocks/shortcode.php'; 62 require ABSPATH . WPINC . '/blocks/site-logo.php'; 63 require ABSPATH . WPINC . '/blocks/site-tagline.php'; 64 require ABSPATH . WPINC . '/blocks/site-title.php'; 65 require ABSPATH . WPINC . '/blocks/social-link.php'; 66 require ABSPATH . WPINC . '/blocks/tag-cloud.php'; 67 require ABSPATH . WPINC . '/blocks/template-part.php'; 68 require ABSPATH . WPINC . '/blocks/term-description.php'; 69 require ABSPATH . WPINC . '/blocks/widget-group.php'; 70 71 /** 72 * Registers core block types using metadata files. 73 * Dynamic core blocks are registered separately. 74 * 75 * @since 5.5.0 76 */ 77 function register_core_block_types_from_metadata() { 78 $block_folders = array( 79 'audio', 80 'button', 81 'buttons', 82 'code', 83 'column', 84 'columns', 85 'embed', 86 'freeform', 87 'group', 88 'heading', 89 'html', 90 'list', 91 'media-text', 92 'missing', 93 'more', 94 'nextpage', 95 'paragraph', 96 'preformatted', 97 'pullquote', 98 'quote', 99 'separator', 100 'social-links', 101 'spacer', 102 'table', 103 'text-columns', 104 'verse', 105 'video', 106 ); 107 108 foreach ( $block_folders as $block_folder ) { 109 register_block_type( 110 ABSPATH . WPINC . '/blocks/' . $block_folder 111 ); 112 } 113 } 114 add_action( 'init', 'register_core_block_types_from_metadata' );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |