Caps “read_private_posts” do not work…
-
OK, let’s be specific:
in “capabilities.php”, you can find this function :function map_meta_cap($cap, $user_id) {
…Where you have:
case ‘read_post’:
$post = get_post($args[0]);if ( ‘private’ != $post->post_status ) {
$caps[] = ‘read’;
break;
}$author_data = get_userdata($user_id);
$post_author_data = get_userdata($post->post_author);
if ($user_id == $post_author_data->ID)
$caps[] = ‘read’;
else
$caps[] = ‘read_private_posts’;
break;
…As you can see, a capability is ready just to make nice work:
READ_PRIVATE_POSTS
So I made a copy/paste in the role manager plugin (many thanks to Owen Winkler and David House) to create a “read_private_posts” capability and grant some roles.
Well, when logged as a granted user I can not see any private post from other users… So what is the point? Is there a second filter somewhere (this would be quite weird)?
I really need your help here!
Current version where tested: WP 2.0.2Alex
PS: I am sure we can use some plugin to make some tweaking stuff but it should be working as simple as it is – and it seems to be a bug…
The topic ‘Caps “read_private_posts” do not work…’ is closed to new replies.