register_block_pattern_category()
最后更新于:2021-11-27 21:27:44
register_block_pattern_category( string$category_name, array$category_properties)Registers a new pattern category.
参数
- $category_name
-
(string) (Required) Pattern category name including namespace.
- $category_properties
-
(array) (Required) Array containing the properties of the category.
响应
(bool) True if the pattern category was registered with success and false otherwise.
源文件
文件: gc-includes/class-gc-block-pattern-categories-registry.php
function register_block_pattern_category( $category_name, $category_properties ) {
return GC_Block_Pattern_Categories_Registry::get_instance()->register( $category_name, $category_properties );
}