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

WordPress Trac noreply at wordpress.org
Thu Sep 5 18:58:10 UTC 2013


#21621: setting meta_type doesn't CAST orderby value
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:  3.7
Component:  Query           |     Version:  3.2
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |
----------------------------+-----------------------------

Comment (by nacin):

 [25255] looks good. get_meta_type() feels a bit generic for a function
 name. I have no idea what it does or returns when looking at it. We also
 already have get_meta_sql() and _get_meta_table() — between the three of
 them, who knows what this should be returning. It's also not for getting
 the type, it's for converting a type to a proper keyword for CAST.

 It think it would make the most sense as a static method on
 WP_Meta_Query().

 `WP_Meta_Query::get_cast_for_type( $type )`, perhaps?
 `WP_Meta_Query::get_cast( $type )`?

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


More information about the wp-trac mailing list