get_allowed_block_template_part_areas
函数
get_allowed_block_template_part_areas ( No parameters )
- 返回值
-
- (array) The supported template part area values.
- 定义位置
-
-
wp-includes/block-template-utils.php
, line 64
-
wp-includes/block-template-utils.php
- 引入
- 5.9.0
- 弃用
- –
Returns a filtered list of allowed area values for template parts.
function get_allowed_block_template_part_areas() { $default_area_definitions = array( array( 'area' => WP_TEMPLATE_PART_AREA_UNCATEGORIZED, 'label' => __( 'General' ), 'description' => __( 'General templates often perform a specific role like displaying post content, and are not tied to any particular area.' ), 'icon' => 'layout', 'area_tag' => 'div', ), array( 'area' => WP_TEMPLATE_PART_AREA_HEADER, 'label' => __( 'Header' ), 'description' => __( 'The Header template defines a page area that typically contains a title, logo, and main navigation.' ), 'icon' => 'header', 'area_tag' => 'header', ), array( 'area' => WP_TEMPLATE_PART_AREA_FOOTER, 'label' => __( 'Footer' ), 'description' => __( 'The Footer template defines a page area that typically contains site credits, social links, or any other combination of blocks.' ), 'icon' => 'footer', 'area_tag' => 'footer', ), ); /** * Filters the list of allowed template part area values. * * @since 5.9.0 * * @param array $default_area_definitions An array of supported area objects. */ return apply_filters( 'default_wp_template_part_areas', $default_area_definitions ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。