Move most instances of new WP_User to get_userdata(). see #21120.
git-svn-id: http://core.svn.wordpress.org/trunk@21413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -249,7 +249,8 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'p
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$user = new WP_User( $user_id );
|
||||
if ( ! $user = get_userdata( $user_id ) )
|
||||
return array();
|
||||
$post_type_obj = get_post_type_object($post_type);
|
||||
|
||||
if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {
|
||||
|
||||
Reference in New Issue
Block a user