0

I have the code to remove the editor from the Appearance menu. But I can't find anyway to remove the editor from the Plugins.

    // Remove Editor from Apperance Menu
function remove_editor_menu() {
  remove_action('admin_menu', '_add_themes_utility_last', 101);
    }
add_action('_admin_menu', 'remove_editor_menu', 1);
  • Friendly reminder to update your question with more info or select a correct answer. – t31os Dec 9 '11 at 15:53
3

The correct way would be to use the disallow file editing constant in your config file.

define( 'DISALLOW_FILE_EDIT', true );

http://codex.wordpress.org/Editing_wp-config.php#Disable_the_Plugin_and_Theme_Editor

2

Here ya go,

   function my_remove_menu_elements()
    {
        remove_submenu_page( 'plugins.php', 'plugin-editor.php' );
    }
    add_action('admin_init', 'my_remove_menu_elements');
0
   function remove_plugin_editor()
    {
        remove_submenu_page( 'plugins.php', 'plugin-editor.php' );
    }
    add_action('admin_init', 'remove_plugin_editor');

for more information on it visit http://codex.wordpress.org/Function_Reference/remove_submenu_page

  • Mohit, this should have been simply an amendement to Wyck's answer... Yours is one and a half hours after his and there's no problem editing someone else's answer. Kind regards :) – brasofilo Jun 4 '12 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.