WordPress.org

Support

Support » Plugins and Hacks » Members » [Plugin: Members] Feature request: Limit Categories in admin per group

[Plugin: Members] Feature request: Limit Categories in admin per group

  • I wrote a bit of code that limits the posts a user can edit/view via the dashboard. The only reason I did this was because every plugin that supposedly could do this for me is either outdated and does not work or is not what I need (see: Bind User to Cat, Limit Categories, Level2Categories, Category Access, Role Scoper, User assign categories).

    Members already has a component that can control which users see individual posts/pages on the front end of a site. I’m not sure how hard it would be to add this feature, but I’d really like to be able to control which groups can edit/view certain posts by category.

    For example, if I create a new group and assign them the Test category, their Edit Posts screen will only show those posts.

    Currently, this is how I’m restricting by user name:

    if ( is_admin() ) {
        global $pagenow;
    
        if ( $pagenow == 'edit.php' ) add_action( 'admin_head', 'post_RestrictCats' );
    }
    
    function post_RestrictCats() {
        global $wp_query, $current_user;
    
        get_currentuserinfo();
    
        $args = implode(',',array(16,11));
    
        if( $current_user->user_login == 'test' ) $wp_query->query( 'cat=' . $args );
    }

    Let me know if this is something that might be possible. Thanks.

    http://wordpress.org/extend/plugins/members/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Members] Feature request: Limit Categories in admin per group’ is closed to new replies.
Skip to toolbar