Remove the theme editor submenu within admin

Posted a snippet yesterday to remove $submenu items but for some reason it does not remove the theme editor panel this way. Adding this snippet to the functions.php of your wordpress theme will remove the theme editor submenu. Or disable editor and plugin modifications entirely.

 

 

function remove_editor_menu() {
remove_action('admin_menu', '_add_themes_utility_last', 101);
}
add_action('_admin_menu', 'remove_editor_menu', 1);

Leave a comment