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_themes_utility_last() WordPress Function

The add_themes_utility_last() function is a utility function that allows you to add a new themes folder to the WordPress installation. This function is useful if you want to add a custom themes folder to your WordPress installation.

_add_themes_utility_last() #

Adds the ‘Theme File Editor’ menu item to the bottom of the Appearance (non-block themes) or Tools (block themes) menu.


Source

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


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Renamed 'Theme Editor' to 'Theme File Editor'. Relocates to Tools for block themes.
3.0.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.