_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.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

null. Nothing.

Usage

_add_plugin_file_editor_to_tools();

Changelog

Since 5.9.0 Introduced.

Code of _add_plugin_file_editor_to_tools() WP 6.1.1

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