Created
October 3, 2012 02:18
-
-
Save hsquareweb/3824549 to your computer and use it in GitHub Desktop.
WP: Hide Theme Editor From Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wpr_remove_editor_menu() { | |
| remove_action('admin_menu', '_add_themes_utility_last', 101); | |
| } | |
| global $remove_submenu_page, $current_user; | |
| get_currentuserinfo(); | |
| if($current_user->user_login == 'admin') { //Specify admin name here | |
| add_action('admin_menu', 'wpr_remove_editor_menu', 1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment