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
檢視更多 >