Last active
October 27, 2022 21:54
-
-
Save tevashov/5172465 to your computer and use it in GitHub Desktop.
Remove Dashboard Widgets According to User Role #WP
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 customize_meta_boxes() { | |
| global $current_user; | |
| get_currentuserinfo(); | |
| if ($current_user->user_level < 3) | |
| remove_meta_box('postcustom','post','normal'); | |
| } | |
| add_action('admin_init','customize_meta_boxes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment