WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
[resolved] Option to turn off authors from seeing each others' post? (3 posts)

  1. Ansel Taft
    Member
    Posted 11 months ago #

    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/

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Ansel,

    It is realized as the separate plugin
    http://wordpress.org/support/plugin/view-own-posts-media-only

    Regards,
    Vladimir.

  3. Ansel Taft
    Member
    Posted 11 months ago #

    Lovely - thank you.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.