date_query_valid_columns

date_query_valid_columns

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('date_query_valid_columns') is found 1 times:

  • /wp-includes/class-wp-date-query.php line 510
    			 *                                are 'post_date', 'post_date_gmt', 'post_modified',
    			 *                                'post_modified_gmt', 'comment_date', 'comment_date_gmt',
    			 *                                'user_registered', 'registered', 'last_updated'.
    			 */
    			if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ), true ) ) {
    				$column = 'post_date';
    			}
    
    			$known_columns = array(
    				$wpdb->posts    => array(
    					'post_date',
    

See this hook used in plugins: