Hide the WordPress Editor menu from the dashboard

As of WordPress 3.4.2, the Editor sub-menu under Appearance will give you access to your theme files. I forget it’s there, usually. Today I realized I had reason to want to lock it up.

Security. Your editor is a gateway for hackers and other unkind folk. Lock that thing up.

So easy. So, so easy. Add this to your functions.php:

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


Wwwowie zowie. Be happy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.