Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a plugin or a way where I can restrict or limit the buttons on the admin interface for a certain user?

For example:

  • for the user who has a role of a writer, he/she can only post content,
    the other buttons are deactivated.

  • for the designer he/she can only change the "Appearance Tab",
    all the others are deactivated.

Is there a solution for that?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

Check out Adminimize, its done by Frank Bueltge a well known plugin author from germany. Link

share|improve this answer
1  
Adminimize is the best. –  Carson Jan 18 '11 at 18:54
1  
Frank is also a member of WPSE: wordpress.stackexchange.com/users/170/bueltge –  t31os Jan 20 '11 at 14:19
add comment

Try something like this:

// function to remove the Links menu item
function wpse_7192_remove_menus()
{
    // setup the global menu variable
    global $menu;

    // this is an array of the menu item names we wish to remove
    $restricted = array( __('Links'));
    end ($menu);

    while (prev($menu))
    {
        $value = explode( ' ', $menu[key($menu)][0] );

        if( in_array( $value[0] != NULL ? $value[0] : "" , $restricted ) )
        {
            unset( $menu[key($menu)] );
        }
    }
}

if(!current_user_can('edit_pages'))
{
    // hook into the action that creates the menu
    add_action('admin_menu', 'wpse_7192_remove_menus');
}

That will remove the links menu for everyone except those that can manage options (which I believe is the Editor level).

So just follow this same logic to remove all the necessary menus for certain user levels.
Check out the post here for further details.

share|improve this answer
    
Only administrators have the manage_options capability, edit_pages, moderate_comments and various others would be appropriate for admins and editors. See: codex.wordpress.org/… –  t31os Jan 20 '11 at 14:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.