diff --git a/wp-includes/block-patterns.php b/wp-includes/block-patterns.php index 4a2886cdfd..133c6d54ea 100644 --- a/wp-includes/block-patterns.php +++ b/wp-includes/block-patterns.php @@ -8,6 +8,59 @@ add_theme_support( 'core-block-patterns' ); +/** + * Registers a new block pattern. + * + * @since 5.5.0 + * + * @param string $pattern_name Block pattern name including namespace. + * @param array $pattern_properties List of properties for the block pattern. + * See WP_Block_Patterns_Registry::register() for accepted arguments. + * @return bool True if the pattern was registered with success and false otherwise. + */ +function register_block_pattern( $pattern_name, $pattern_properties ) { + return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties ); +} + +/** + * Unregisters a block pattern. + * + * @since 5.5.0 + * + * @param string $pattern_name Block pattern name including namespace. + * @return bool True if the pattern was unregistered with success and false otherwise. + */ +function unregister_block_pattern( $pattern_name ) { + return WP_Block_Patterns_Registry::get_instance()->unregister( $pattern_name ); +} + +/** + * Registers a new pattern category. + * + * @since 5.5.0 + * + * @param string $category_name Pattern category name including namespace. + * @param array $category_properties List of properties for the block pattern. + * See WP_Block_Pattern_Categories_Registry::register() for + * accepted arguments. + * @return bool True if the pattern category was registered with success and false otherwise. + */ +function register_block_pattern_category( $category_name, $category_properties ) { + return WP_Block_Pattern_Categories_Registry::get_instance()->register( $category_name, $category_properties ); +} + +/** + * Unregisters a pattern category. + * + * @since 5.5.0 + * + * @param string $category_name Pattern category name including namespace. + * @return bool True if the pattern category was unregistered with success and false otherwise. + */ +function unregister_block_pattern_category( $category_name ) { + return WP_Block_Pattern_Categories_Registry::get_instance()->unregister( $category_name ); +} + /** * Registers the core block patterns and categories. * diff --git a/wp-includes/class-wp-block-pattern-categories-registry.php b/wp-includes/class-wp-block-pattern-categories-registry.php index 05ddce8af0..be7cd6d467 100644 --- a/wp-includes/class-wp-block-pattern-categories-registry.php +++ b/wp-includes/class-wp-block-pattern-categories-registry.php @@ -162,30 +162,3 @@ final class WP_Block_Pattern_Categories_Registry { return self::$instance; } } - -/** - * Registers a new pattern category. - * - * @since 5.5.0 - * - * @param string $category_name Pattern category name including namespace. - * @param array $category_properties List of properties for the block pattern. - * See WP_Block_Pattern_Categories_Registry::register() for - * accepted arguments. - * @return bool True if the pattern category was registered with success and false otherwise. - */ -function register_block_pattern_category( $category_name, $category_properties ) { - return WP_Block_Pattern_Categories_Registry::get_instance()->register( $category_name, $category_properties ); -} - -/** - * Unregisters a pattern category. - * - * @since 5.5.0 - * - * @param string $category_name Pattern category name including namespace. - * @return bool True if the pattern category was unregistered with success and false otherwise. - */ -function unregister_block_pattern_category( $category_name ) { - return WP_Block_Pattern_Categories_Registry::get_instance()->unregister( $category_name ); -} diff --git a/wp-includes/class-wp-block-patterns-registry.php b/wp-includes/class-wp-block-patterns-registry.php index 4667979fc7..fe85160bac 100644 --- a/wp-includes/class-wp-block-patterns-registry.php +++ b/wp-includes/class-wp-block-patterns-registry.php @@ -277,29 +277,3 @@ final class WP_Block_Patterns_Registry { return self::$instance; } } - -/** - * Registers a new block pattern. - * - * @since 5.5.0 - * - * @param string $pattern_name Block pattern name including namespace. - * @param array $pattern_properties List of properties for the block pattern. - * See WP_Block_Patterns_Registry::register() for accepted arguments. - * @return bool True if the pattern was registered with success and false otherwise. - */ -function register_block_pattern( $pattern_name, $pattern_properties ) { - return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties ); -} - -/** - * Unregisters a block pattern. - * - * @since 5.5.0 - * - * @param string $pattern_name Block pattern name including namespace. - * @return bool True if the pattern was unregistered with success and false otherwise. - */ -function unregister_block_pattern( $pattern_name ) { - return WP_Block_Patterns_Registry::get_instance()->unregister( $pattern_name ); -} diff --git a/wp-includes/version.php b/wp-includes/version.php index abb93c2c88..13192f7a92 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61347'; +$wp_version = '7.0-alpha-61348'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.