How to hide " New" button at top bar from non-administrators
-
Hello guys,
How do I hide “+New” button, located at top bar, from non-administrators?
I’ve tried this code but with no result:
function RemoveAddMediaButtonsForNonAdmins(){ if ( !current_user_can( 'manage_options' ) ) { remove_action( 'media_buttons', 'media_buttons' ); } } add_action('admin_head', 'RemoveAddMediaButtonsForNonAdmins');
Thank You!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to hide " New" button at top bar from non-administrators’ is closed to new replies.