_add_plugin_file_editor_to_tools

函数
_add_plugin_file_editor_to_tools ( No parameters )

_add_plugin_file_editor_to_tools: 这个函数用来将插件编辑器添加到WordPress的工具菜单中。插件编辑器允许用户在WordPress的仪表盘上编辑插件的代码。

在”工具”中的”主题文件编辑器”之后增加了”插件文件编辑器”菜单项,用于区块主题。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _add_plugin_file_editor_to_tools() {
if ( ! wp_is_block_theme() ) {
return;
}
add_submenu_page(
'tools.php',
__( 'Plugin File Editor' ),
__( 'Plugin File Editor' ),
'edit_plugins',
'plugin-editor.php'
);
}
function _add_plugin_file_editor_to_tools() { if ( ! wp_is_block_theme() ) { return; } add_submenu_page( 'tools.php', __( 'Plugin File Editor' ), __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' ); }
function _add_plugin_file_editor_to_tools() {
	if ( ! wp_is_block_theme() ) {
		return;
	}
	add_submenu_page(
		'tools.php',
		__( 'Plugin File Editor' ),
		__( 'Plugin File Editor' ),
		'edit_plugins',
		'plugin-editor.php'
	);
}

常见问题

FAQs
查看更多 >