[wp-trac] [WordPress Trac] #27060: WP_User_Query using deprecated method of finding author

WordPress Trac noreply at wordpress.org
Fri Feb 7 21:59:29 UTC 2014


#27060: WP_User_Query using deprecated method of finding author
-------------------------+-----------------------------
 Reporter:  Ckeboss      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Users        |    Version:  3.8.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 WP_User_Query uses

 {{{
  if ( isset( $qv['who'] ) && 'authors' == $qv['who'] && $blog_id ) {
     $qv['meta_key'] = $wpdb->get_blog_prefix( $blog_id ) . 'user_level';
     $qv['meta_value'] = 0;
      $qv['meta_compare'] = '!=';
     $qv['blog_id'] = $blog_id = 0; // Prevent extra meta query
 }
 }}}

 When PREFIX_user_level is deprecated. A better check is checking to see if
 that user has the ability to edit_posts, as that would be one who can
 write.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27060>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list