[wp-trac] [WordPress Trac] #31220: Add orderby meta_value_num to WP_User_Query

WordPress Trac noreply at wordpress.org
Tue Feb 3 08:26:05 UTC 2015


#31220: Add orderby meta_value_num to WP_User_Query
--------------------------+-----------------------------
 Reporter:  shyammakwana  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  4.0.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 For some reason, we cannot easily order the `WP_User_Query()` by
 meta_value which is number without directly editing the SQL statements.

 However, there is an way by adding a hook to
 [https://developer.wordpress.org/reference/hooks/pre_user_query/
 pre_user_query] works.

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


More information about the wp-trac mailing list