[wp-trac] [WordPress Trac] #32115: Extend functionality of WP_Date_Query beyond core tables

WordPress Trac noreply at wordpress.org
Fri Apr 24 15:04:27 UTC 2015


#32115: Extend functionality of WP_Date_Query beyond core tables
-------------------------+------------------------------
 Reporter:  transom      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Date/Time    |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by boonebgorges):

 Can you explain how 'date_query_valid_columns' doesn't already allow this?

 {{{
 function wp32115_add_valid_date_column( $cols ) {
     $cols[] = 'foo';
     return $cols;
 }
 add_filter( 'date_query_valid_columns', 'wp32115_add_valid_date_column' );

 $date_query = new WP_Date_Query( array(
     array(
         'column' => 'foo',
         'year' => 2015,
     ),
 ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32115#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list