_add_themes_utility_last

函式
_add_themes_utility_last ( No parameters )
Access
Private
定義位置
相關方法
add_utility_pageadd_theme_supportadd_theme_pageget_parent_theme_file_pathget_theme_file_path
引入
3.0.0
棄用
-

_add_themes_utility_last: 這個函式用來在WordPress主題選單的末尾新增一個實用函式: 這個函式可以用來在主題選單中新增自定義動作或連結。

將”主題檔案編輯器”選單項新增到外觀(非區塊主題)或工具(區塊主題)選單的底部。或工具(區塊主題)選單的底部。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _add_themes_utility_last() {
add_submenu_page(
wp_is_block_theme() ? 'tools.php' : 'themes.php',
__( 'Theme File Editor' ),
__( 'Theme File Editor' ),
'edit_themes',
'theme-editor.php'
);
}
function _add_themes_utility_last() { add_submenu_page( wp_is_block_theme() ? 'tools.php' : 'themes.php', __( 'Theme File Editor' ), __( 'Theme File Editor' ), 'edit_themes', 'theme-editor.php' ); }
function _add_themes_utility_last() {
	add_submenu_page(
		wp_is_block_theme() ? 'tools.php' : 'themes.php',
		__( 'Theme File Editor' ),
		__( 'Theme File Editor' ),
		'edit_themes',
		'theme-editor.php'
	);
}

常見問題

FAQs
檢視更多 >