wpseek.com
WordPress开发者和主题制作者的搜索引擎
_add_block_template_part_area_info is private and should not be used in themes or plugins directly.
_add_block_template_part_area_info › WordPress Function
Since5.9.0
已弃用n/a
› _add_block_template_part_area_info ( $template_info )
| 访问: |
|
| 参数: |
|
| 返回: |
|
| 定义在: |
|
| 文档: |
Attempts to add the template part's area information to the input template.
源码
function _add_block_template_part_area_info( $template_info ) {
if ( wp_theme_has_theme_json() ) {
$theme_data = wp_get_theme_data_template_parts();
}
if ( isset( $theme_data[ $template_info['slug'] ]['area'] ) ) {
$template_info['title'] = $theme_data[ $template_info['slug'] ]['title'];
$template_info['area'] = _filter_block_template_part_area( $theme_data[ $template_info['slug'] ]['area'] );
} else {
$template_info['area'] = WP_TEMPLATE_PART_AREA_UNCATEGORIZED;
}
return $template_info;
}