mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 07:05:37 +01:00
bc7de32645
See #50504, #50550. Built from https://develop.svn.wordpress.org/trunk@48345 git-svn-id: http://core.svn.wordpress.org/trunk@48114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Register the block patterns and block patterns categories
|
|
*
|
|
* @package WordPress
|
|
* @since 5.5.0
|
|
*/
|
|
|
|
$core_block_patterns = array(
|
|
'text-two-columns',
|
|
'two-buttons',
|
|
'two-images',
|
|
'text-two-columns-with-images',
|
|
'text-three-columns-buttons',
|
|
'large-header',
|
|
'large-header-paragraph',
|
|
'three-buttons',
|
|
'quote',
|
|
);
|
|
|
|
foreach ( $core_block_patterns as $core_block_pattern ) {
|
|
register_block_pattern(
|
|
'core/' . $core_block_pattern,
|
|
require __DIR__ . '/block-patterns/' . $core_block_pattern . '.php'
|
|
);
|
|
}
|
|
|
|
register_block_pattern_category( 'buttons', array( 'label' => _x( 'Buttons', 'Block pattern category', 'gutenberg' ) ) );
|
|
register_block_pattern_category( 'columns', array( 'label' => _x( 'Columns', 'Block pattern category', 'gutenberg' ) ) );
|
|
register_block_pattern_category( 'gallery', array( 'label' => _x( 'Gallery', 'Block pattern category', 'gutenberg' ) ) );
|
|
register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category', 'gutenberg' ) ) );
|
|
register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category', 'gutenberg' ) ) );
|