Use correct cap in get_editable_user_ids(). edit_cap is the meta cap (edit_post) and needs a post id passed, edit_type_cap is the primitive edit_posts cap.
git-svn-id: https://develop.svn.wordpress.org/trunk@13955 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2878b0618a
commit
5be7345c1b
@ -250,7 +250,7 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'p
|
||||
$post_type_obj = get_post_type_object($post_type);
|
||||
|
||||
if ( ! $user->has_cap($post_type_obj->edit_others_cap) ) {
|
||||
if ( $user->has_cap($post_type_obj->edit_cap) || $exclude_zeros == false )
|
||||
if ( $user->has_cap($post_type_obj->edit_type_cap) || ! $exclude_zeros )
|
||||
return array($user->id);
|
||||
else
|
||||
return array();
|
||||
|
Loading…
Reference in New Issue
Block a user