_get_template_edit_filename

函数
_get_template_edit_filename ( $fullpath, $containingfolder )
Access
Private
参数
  • (string) $fullpath Full path to the theme file
    Required:
  • (string) $containingfolder Path of the theme parent folder
    Required:
返回值
  • (string)
定义位置
相关方法
_get_block_template_file_get_block_templates_filesget_template_hierarchyget_template_directoryget_template_part
引入
2.9.0
弃用
-

_get_template_edit_filename是一个WordPress函数,用于返回要编辑的主题模板文件的文件路径: 这个函数用来检索可以从WordPress编辑器中编辑的主题模板文件的路径。它需要一个参数,即模板文件名。

为主题文件编辑器显示的网址整理一个文件名。

function _get_template_edit_filename( $fullpath, $containingfolder ) {
	return str_replace( dirname( dirname( $containingfolder ) ), '', $fullpath );
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-14 09:36:28

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

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

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