Option to turn off authors from seeing each others' post?
-
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’);Thanks,
Ansel
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.