_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編輯器中編輯的主題模板檔案的路徑。它需要一個引數,即模板檔名。

為主題檔案編輯器顯示的網址整理一個檔名。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _get_template_edit_filename( $fullpath, $containingfolder ) {
return str_replace( dirname( dirname( $containingfolder ) ), '', $fullpath );
}
function _get_template_edit_filename( $fullpath, $containingfolder ) { return str_replace( dirname( dirname( $containingfolder ) ), '', $fullpath ); }
function _get_template_edit_filename( $fullpath, $containingfolder ) {
	return str_replace( dirname( dirname( $containingfolder ) ), '', $fullpath );
}

常見問題

FAQs
檢視更多 >