twentytwentytwo_block_pattern_categories

过滤钩子
apply_filters( 'twentytwentytwo_block_pattern_categories', $block_pattern_categories )
参数
  • (array[]) $block_pattern_categories { An associative array of block pattern categories, keyed by category name. @type array[] $properties { An array of block category properties. @type string $label A human-readable label for the pattern category. } }
    Required:
定义位置
  • wp-content/themes/twentytwentytwo/inc/block-patterns.php , line 39
相关勾子
twentytwentytwo_block_patternstwenty_twenty_one_starter_contenttwentytwenty_starter_contenttwentytwenty_site_logo_argstwentytwenty_show_categories_in_entry_header
相关方法
_register_core_block_patterns_and_categoriesrender_block_core_categoriesregister_block_core_categoriesget_block_categoriesget_default_block_categories_register_theme_block_patterns
引入
Twenty Twenty-Two 1.0
弃用
-

twentytwo_block_pattern_categories 是WordPress主题Twenty Twenty-Two中的一个函数。它定义了”twentytwo_block_patterns”函数中定义的区块图案的类别。这使得用户可以在区块编辑器中轻松找到并使用这些模式。

过滤主题区块样板的类别。

$block_pattern_categories = apply_filters( 'twentytwentytwo_block_pattern_categories', $block_pattern_categories );

常见问题

FAQs
查看更多 >