[wp-trac] [WordPress Trac] #21621: setting meta_type doesn't CAST orderby value

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 18 01:21:21 UTC 2012


#21621: setting meta_type doesn't CAST orderby value
----------------------------+------------------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Query           |     Version:  3.2
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------------
Changes (by dd32):

 * type:  defect (bug) => enhancement


Comment:

 Since we don't currently have a meta_type query var, it's expected that
 specifying it would result in nothing changing, changing this to an
 enhancement as a result of that.

 In order to order by a meta value numerically, we currently have
 {{{orderby: meta_value_num}}} which uses a meta_value+0 syntax to convert
 the field value to a numeric value.  Of course, this doesn't work for
 dates/times

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21621#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list