WP_Date_Query::validate_column

SummerySummery

Validates a column name parameter.

Syntax

WP_Date_Query::validate_column( string $column )

DescriptionDescription

Column names without a table prefix (like ‘post_date’) are checked against a whitelist of known tables, and then, if found, have a table prefix (such as ‘wp_posts.’) prepended. Prefixed column names (such as ‘wp_posts.post_date’) bypass this whitelist check, and are only sanitized to remove illegal characters.

ParametersParameters

$column

(string) (Required) The user-supplied column name.

ReturnReturn

(string) A validated column name value.

SourceSource

File: wp-includes/class-wp-date-query.php


			

ChangelogChangelog

Changelog
Version Description
3.7.0 Introduced.
Scroll to Top