build_template_part_block_area_variations
函数
build_template_part_block_area_variations ( No parameters )
- 返回值
-
- (array) Array containing the block variation objects.
- 定义位置
-
-
wp-includes/blocks/template-part.php
, line 166
-
wp-includes/blocks/template-part.php
- 引入
- –
- 弃用
- –
返回模板零件块的面积变化对象的数组。
function build_template_part_block_area_variations() { $variations = array(); $defined_areas = get_allowed_block_template_part_areas(); foreach ( $defined_areas as $area ) { if ( 'uncategorized' !== $area['area'] ) { $variations[] = array( 'name' => $area['area'], 'title' => $area['label'], 'description' => $area['description'], 'attributes' => array( 'area' => $area['area'], ), 'scope' => array( 'inserter' ), 'icon' => $area['icon'], ); } } return $variations; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。