_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.
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.
Returns
null. Nothing (null).
Usage
_add_themes_utility_last();
Changelog
| Since 3.0.0 | Introduced. |
| Since 5.9.0 | Renamed 'Theme Editor' to 'Theme File Editor'. Relocates to Tools for block themes. |
_add_themes_utility_last() add themes utility last code WP 6.9.1
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'
);
}