wphooks.info - date_query_valid_columns

date_query_valid_columns

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/date.php:
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
			 * Filters the list of valid date query columns.
			 *
			 * @since 3.7.0
			 * @since 4.1.0 Added 'user_registered' to the default recognized columns.
			 *
			 * @param array $valid_columns An array of valid date query columns. Defaults
			 *                             are 'post_date', 'post_date_gmt', 'post_modified',
			 *                             'post_modified_gmt', 'comment_date', 'comment_date_gmt',
			 *	                           'user_registered'
			 */
			if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) ) {
				$column = 'post_date';
			}

			$known_columns = array(
				$wpdb->posts => array(
					'post_date',
					'post_date_gmt',
					'post_modified',
					'post_modified_gmt',