wpseek.com
WordPress开发者和主题制作者的搜索引擎



register_block_pattern_category › WordPress Function

Since5.5.0
已弃用n/a
› register_block_pattern_category ( $category_name, $category_properties )
参数: (2)
  • (string) $category_name Pattern category name including namespace.
    Required: Yes
  • (array) $category_properties List of properties for the block pattern. See WP_Block_Pattern_Categories_Registry::register() for accepted arguments.
    Required: Yes
返回:
  • (bool) True if the pattern category was registered with success and false otherwise.
定义在:
文档:

Registers a new pattern category.



源码

function register_block_pattern_category( $category_name, $category_properties ) {
	return WP_Block_Pattern_Categories_Registry::get_instance()->register( $category_name, $category_properties );
}