Created
June 5, 2013 23:32
-
-
Save jamesbryant/5718160 to your computer and use it in GitHub Desktop.
Remove Admin Cruft for Editors
This file contains 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
// | |
// Remove Admin Cruft for Editors | |
// | |
if (is_admin()) { | |
function bry_remove_meta_boxes() { | |
if(!current_user_can('administrator')) { | |
remove_meta_box('linktargetdiv', 'link', 'normal'); | |
remove_meta_box('linkxfndiv', 'link', 'normal'); | |
remove_meta_box('linkadvanceddiv', 'link', 'normal'); | |
remove_meta_box('postexcerpt', 'post', 'normal'); | |
remove_meta_box('trackbacksdiv', 'post', 'normal'); | |
remove_meta_box('commentstatusdiv', 'post', 'normal'); | |
remove_meta_box('postcustom', 'post', 'normal'); | |
remove_meta_box('commentstatusdiv', 'post', 'normal'); | |
remove_meta_box('commentsdiv', 'post', 'normal'); | |
remove_meta_box('revisionsdiv', 'post', 'normal'); | |
remove_meta_box('authordiv', 'post', 'normal'); | |
remove_meta_box('sqpt-meta-tags', 'post', 'normal'); | |
} | |
} | |
add_action( 'admin_menu', 'bry_remove_meta_boxes' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment