Support » Plugin: User Role Editor » Option to turn off authors from seeing each others' post?

  • Resolved Ansel Taft

    (@anseltaft)


    Hi Vladimir,

    I couldn’t spot a way to turn off authors’ ability to see each others’ posts in URE and I wondered if you would consider adding something like the following code snippet, to allow URE users to turn this on at a plugin level (as opposed to dropping it into functions.php)?

    // Disallow authors to see each others’ posts (thought they can still see post counts)

    function posts_for_current_author($query) {
    global $user_level;

    if($query->is_admin && $user_level < 5) {
    global $user_ID;
    $query->set(‘author’, $user_ID);
    unset($user_ID);
    }
    unset($user_level);

    return $query;
    }
    add_filter(‘pre_get_posts’, ‘posts_for_current_author’);

    Source: http://wordpress.org/support/topic/show-only-authors-posts-in-admin-panel-instead-of-all-posts

    Thanks,

    Ansel

    http://wordpress.org/plugins/user-role-editor/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Option to turn off authors from seeing each others' post?’ is closed to new replies.