parent_theme_file_path

過濾鉤子
apply_filters( 'parent_theme_file_path', $path, $file )
引數
  • (string) $path The file path.
    Required:
  • (string) $file The requested file to search for.
    Required:
定義位置
相關勾子
parent_theme_file_uritheme_file_pathparent_filepre_get_site_by_pathget_template_part
相關方法
get_parent_theme_file_pathget_theme_file_pathget_parent_theme_file_uriwp_print_theme_file_treewp_make_theme_file_treeget_theme_file_uri
引入
4.7.0
棄用
-

parent_theme_file_path: 這個函式返回位於父主題的檔案的完整路徑。它通常用於在子主題中包含父主題的檔案,或者在包含檔案之前檢查檔案是否存在於父主題中。

過濾父主題中檔案的路徑。

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

常見問題

FAQs
檢視更多 >