Remove the upload buttons for author and other wordpress user

Sponsors

If you want to restrict the normal author to upload media file your wordpress blog. So you can use the following code in your functions.php file.

Following function will remove the upload media button from wordpress dashboard.


//remove the upload buttons for auther and other wordpress user
function removemediabuttons()
{
if($user->wp_user_level >= 1) {
remove_action( 'media_buttons', 'media_buttons' );
}

}
add_action('admin_head','removemediabuttons');

Following code will remove the media library tab from the Add new post section for all the users.
Restricts media library access (subscriber) under the “add new post”

function remove_medialibrary_tab($tabs) {
unset($tabs['library']);
return $tabs;
}
add_filter('media_upload_tabs','remove_medialibrary_tab');

This hack is very important for wordpress developers. when you are developing the multiuser wordpress site.

Incoming search terms:

You may like following Articles!

5 thoughts on “Remove the upload buttons for author and other wordpress user

  1. Awsome info and straight to the point. I am not sure if this is in fact the best place to ask but do you guys have any thoughts on where to employ some professional writers? Thank you :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>