Changeset 15539 for trunk/wp-admin/includes/user.php
- Timestamp:
- 08/27/2010 12:18:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r15491 r15539 241 241 * 242 242 * @param int $user_id User ID. 243 * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros. 244 * @return unknown 245 */ 246 function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) { 247 global $wpdb; 243 * @param bool $deprecated Not used. 244 * @return array 245 */ 246 function get_editable_user_ids( $user_id, $deprecated = true, $post_type = 'post' ) { 247 global $wpdb; 248 249 if ( !$deprecated ) 250 _deprecated_argument( __FUNCTION__, '3.1.0' ); 248 251 249 252 $user = new WP_User( $user_id ); … … 257 260 } 258 261 259 if ( !is_multisite() ) 260 $level_key = $wpdb->get_blog_prefix() . 'user_level'; 261 else 262 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels 263 264 $query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key); 265 if ( $exclude_zeros ) 266 $query .= " AND meta_value != '0'"; 267 268 return $wpdb->get_col( $query ); 262 return get_users( array('fields' => 'ids') ); 269 263 } 270 264
Note: See TracChangeset
for help on using the changeset viewer.