_add_plugin_file_editor_to_tools()WP 5.9.0

Adds the 'Plugin File Editor' menu item after the 'Themes File Editor' in Tools for block themes.

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

null. Nothing (null).

Usage

_add_plugin_file_editor_to_tools();

Changelog

Since 5.9.0 Introduced.

_add_plugin_file_editor_to_tools() code WP 6.5.2

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'
	);
}