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


Generated: Mon Jul 26 01:00:04 2021 Cross-referenced by PHPXref 0.7.1