Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

_add_plugin_file_editor_to_tools() WordPress Function

This function enables the editor for plugin files to be displayed in the Tools section of the WordPress Dashboard. This is useful for making changes to plugin files without having to directly edit the files themselves.

_add_plugin_file_editor_to_tools() #

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


Source

File: wp-admin/menu.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'
	);
}


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.