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:
Andrew Nacin 2010-04-03 04:38:20 +00:00
parent 2878b0618a
commit 5be7345c1b
1 changed files with 1 additions and 1 deletions

View File

@ -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();