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:
nacin 2010-04-03 04:38:20 +00:00
parent 0af8aa67b6
commit 69f5922799
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();