wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_get_theme_data_template_parts › WordPress Function
Since6.4.0
已弃用n/a
› wp_get_theme_data_template_parts ( 没有参数 )
| 返回: |
|
| 定义在: |
|
| 文档: |
Returns the metadata for the template parts defined by the theme.
源码
function wp_get_theme_data_template_parts() {
$cache_group = 'theme_json';
$cache_key = 'wp_get_theme_data_template_parts';
$can_use_cached = ! wp_is_development_mode( 'theme' );
if ( $can_use_cached ) {
$metadata = wp_cache_get( $cache_key, $cache_group );
if ( false !== $metadata ) {
return $metadata;
}
}
$metadata = WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_template_parts();
if ( $can_use_cached ) {
wp_cache_set( $cache_key, $metadata, $cache_group );
}
return $metadata;
}