[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/blocks/ -> index.php (source)

   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/block.php';
  11  require ABSPATH . WPINC . '/blocks/calendar.php';
  12  require ABSPATH . WPINC . '/blocks/categories.php';
  13  require ABSPATH . WPINC . '/blocks/file.php';
  14  require ABSPATH . WPINC . '/blocks/gallery.php';
  15  require ABSPATH . WPINC . '/blocks/image.php';
  16  require ABSPATH . WPINC . '/blocks/latest-comments.php';
  17  require ABSPATH . WPINC . '/blocks/latest-posts.php';
  18  require ABSPATH . WPINC . '/blocks/legacy-widget.php';
  19  require ABSPATH . WPINC . '/blocks/loginout.php';
  20  require ABSPATH . WPINC . '/blocks/navigation-link.php';
  21  require ABSPATH . WPINC . '/blocks/navigation-submenu.php';
  22  require ABSPATH . WPINC . '/blocks/navigation.php';
  23  require ABSPATH . WPINC . '/blocks/page-list.php';
  24  require ABSPATH . WPINC . '/blocks/pattern.php';
  25  require ABSPATH . WPINC . '/blocks/post-author.php';
  26  require ABSPATH . WPINC . '/blocks/post-comments.php';
  27  require ABSPATH . WPINC . '/blocks/post-content.php';
  28  require ABSPATH . WPINC . '/blocks/post-date.php';
  29  require ABSPATH . WPINC . '/blocks/post-excerpt.php';
  30  require ABSPATH . WPINC . '/blocks/post-featured-image.php';
  31  require ABSPATH . WPINC . '/blocks/post-navigation-link.php';
  32  require ABSPATH . WPINC . '/blocks/post-template.php';
  33  require ABSPATH . WPINC . '/blocks/post-terms.php';
  34  require ABSPATH . WPINC . '/blocks/post-title.php';
  35  require ABSPATH . WPINC . '/blocks/query-pagination-next.php';
  36  require ABSPATH . WPINC . '/blocks/query-pagination-numbers.php';
  37  require ABSPATH . WPINC . '/blocks/query-pagination-previous.php';
  38  require ABSPATH . WPINC . '/blocks/query-pagination.php';
  39  require ABSPATH . WPINC . '/blocks/query-title.php';
  40  require ABSPATH . WPINC . '/blocks/query.php';
  41  require ABSPATH . WPINC . '/blocks/rss.php';
  42  require ABSPATH . WPINC . '/blocks/search.php';
  43  require ABSPATH . WPINC . '/blocks/shortcode.php';
  44  require ABSPATH . WPINC . '/blocks/site-logo.php';
  45  require ABSPATH . WPINC . '/blocks/site-tagline.php';
  46  require ABSPATH . WPINC . '/blocks/site-title.php';
  47  require ABSPATH . WPINC . '/blocks/social-link.php';
  48  require ABSPATH . WPINC . '/blocks/tag-cloud.php';
  49  require ABSPATH . WPINC . '/blocks/template-part.php';
  50  require ABSPATH . WPINC . '/blocks/term-description.php';
  51  
  52  /**
  53   * Registers core block types using metadata files.
  54   * Dynamic core blocks are registered separately.
  55   *
  56   * @since 5.5.0
  57   */
  58  function register_core_block_types_from_metadata() {
  59      $block_folders = array(
  60          'audio',
  61          'button',
  62          'buttons',
  63          'code',
  64          'column',
  65          'columns',
  66          'cover',
  67          'embed',
  68          'freeform',
  69          'group',
  70          'heading',
  71          'html',
  72          'list',
  73          'media-text',
  74          'missing',
  75          'more',
  76          'nextpage',
  77          'paragraph',
  78          'preformatted',
  79          'pullquote',
  80          'quote',
  81          'separator',
  82          'social-links',
  83          'spacer',
  84          'table',
  85          'text-columns',
  86          'verse',
  87          'video',
  88      );
  89  
  90      foreach ( $block_folders as $block_folder ) {
  91          register_block_type(
  92              ABSPATH . WPINC . '/blocks/' . $block_folder
  93          );
  94      }
  95  }
  96  add_action( 'init', 'register_core_block_types_from_metadata' );


Generated: Fri Jan 28 01:00:03 2022 Cross-referenced by PHPXref 0.7.1