wp_get_theme_data_custom_templates

函数
wp_get_theme_data_custom_templates ( No parameters )
返回值
  • (array) Associative array of `$template_name => $template_data` pairs, with `$template_data` having "title" and "postTypes" fields.
定义位置
相关方法
wp_get_theme_data_template_partswp_theme_auto_update_setting_templatewp_get_theme_directory_pattern_slugswp_print_media_templatesget_embed_template
引入
6.4.0
弃用
-

通过theme.json返回主题定义的自定义模板的元数据。

function wp_get_theme_data_custom_templates() {
	return WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_custom_templates();
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 20:33:00

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: