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've got an action set up on admin_menu to modify it as needed. I successfully removed the themes menu with the following:

remove_submenu_page('themes.php', 'themes.php');

Now I want to get rid of the useless yet dangerous theme editor.

remove_submenu_page('themes.php', 'theme-editor.php');

This refuses to work for whatever reason. I can remove any of the other appearance menu items but the theme editor refuses to listen to my demands.

That particular menu item is indeed added via add_submenu_page on line 163 of wp-admin/menu.php so I fail to see why I can't get rid of it.

Is this a bug or am I missing something?

share|improve this question
4  
You can disable the the theme and plugin editor with define('DISALLOW_FILE_EDIT',true) in your config file. –  t31os Feb 28 '11 at 18:58
1  
@t31os could you please move that to an answer? :) –  Rarst Sep 28 '11 at 12:31
add comment

2 Answers

Use this to get rid of the theme editor but it also gets rid of the plugin editor.

Paste in your wp-config.php: define('DISALLOW_FILE_EDIT', true)

share|improve this answer
1  
You sure about this constant? I can't seem to find it in source or Codex. –  Rarst Sep 28 '11 at 12:31
1  
t31os provided an answer inside the comments, this answer cites an apparently inexistant constant... so, made a merge... –  brasofilo Jun 18 '12 at 20:06
add comment

In WP 3.1, you should be able to use the views_users filter to limit the views displayed on the users page. The views are the horizontally arranged links to filter by role.

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.