theme_file_path

过滤钩子
apply_filters( 'theme_file_path', $path, $file )
参数
  • (string) $path The file path.
    Required:
  • (string) $file The requested file to search for.
    Required:
定义位置
相关勾子
parent_theme_file_paththeme_file_uritheme_templatesthe_modified_authorthe_title_export
相关方法
get_theme_file_pathget_parent_theme_file_pathget_theme_file_urithe_modified_authorget_file_datawp_make_theme_file_tree
引入
4.7.0
弃用
-

theme_file_path是一个WordPress过滤钩子,允许开发者修改主题文件的文件路径。这可以用来加载自定义文件或改变主题内文件的位置。

过滤主题中的文件的路径。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'theme_file_path', $path, $file );
return apply_filters( 'theme_file_path', $path, $file );
return apply_filters( 'theme_file_path', $path, $file );

常见问题

FAQs
查看更多 >
闪电伯伯

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

2025-11-01 22:19:47

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

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

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