X

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.



Code Snippet:


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

Comments  Leave a Reply

  1. hi,

    it seems that you may use this instead :

    define( 'DISALLOW_FILE_EDIT', true );

    1. Yes this is true I posted this snippet a while back, but I think Ill link to this in the post above as well. Thanks Seb,

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!