get_parent_theme_file_path()
get_parent_theme_file_path( string $file = ” )
检索父主题中文件的路径。
Retrieves the path of a file in the parent theme.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$file | (string) | 可选 | 返回模板目录中的路径的文件。 |
返回(Return)
(string)文件的路径。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/link-template.php:4370 | 0 | 3 |
笔记(Notes)
在中包含/需要PHP文件的正确方法函数.php或者其他的。
get_parent_theme_file_path() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_parent_theme_file_path/