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: http://svn.automattic.com/wordpress/trunk@13955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0af8aa67b6
commit
69f5922799
|
@ -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