Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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);
share|improve this question
    
Friendly reminder to update your question with more info or select a correct answer. –  t31os Dec 9 '11 at 15:53
add comment

3 Answers

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

share|improve this answer
add comment
   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

share|improve this answer
    
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
add comment

Here ya go,

   function my_remove_menu_elements()
    {
        remove_submenu_page( 'plugins.php', 'plugin-editor.php' );
    }
    add_action('admin_init', 'my_remove_menu_elements');
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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