Docs: Update `WP_Date_Query` documentation to reflect changes in accepted column names.
Remove outdated list of accepted column name values, add a reference to `WP_Date_Query::validate_column()` and the `date_query_valid_columns` filter instead for a more detailed description. Follow-up to [25139], [25860], [29933], [29934], [29938], [37477], [51905]. Props dimadin, johnjamesjacoby. Fixes #54248. Built from https://develop.svn.wordpress.org/trunk@51906 git-svn-id: http://core.svn.wordpress.org/trunk@51499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b2c8d3bb8c
commit
000a1202ad
|
@ -74,8 +74,8 @@ class WP_Date_Query {
|
|||
*
|
||||
* @type array ...$0 {
|
||||
* @type string $column Optional. The column to query against. If undefined, inherits the value of
|
||||
* the `$default_column` parameter. Accepts 'post_date', 'post_date_gmt',
|
||||
* 'post_modified','post_modified_gmt', 'comment_date', 'comment_date_gmt'.
|
||||
* the `$default_column` parameter. See WP_Date_Query::validate_column() and
|
||||
* the {@see 'date_query_valid_columns'} filter for the list of accepted values.
|
||||
* Default 'post_date'.
|
||||
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=',
|
||||
* 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default '='.
|
||||
|
@ -104,11 +104,11 @@ class WP_Date_Query {
|
|||
* @type string $day Optional when passing array.The day of the month. Accepts numbers 1-31.
|
||||
* Default (string:empty)|(array:last day of month).
|
||||
* }
|
||||
* @type string $column Optional. Used to add a clause comparing a column other than the
|
||||
* column specified in the top-level `$column` parameter. Accepts
|
||||
* 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt',
|
||||
* 'comment_date', 'comment_date_gmt'. Default is the value of
|
||||
* top-level `$column`.
|
||||
* @type string $column Optional. Used to add a clause comparing a column other than
|
||||
* the column specified in the top-level `$column` parameter.
|
||||
* See WP_Date_Query::validate_column() and
|
||||
* the {@see 'date_query_valid_columns'} filter for the list
|
||||
* of accepted values. Default is the value of top-level `$column`.
|
||||
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=',
|
||||
* '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN',
|
||||
* 'NOT IN', 'BETWEEN', and 'NOT BETWEEN'. Comparisons support
|
||||
|
@ -140,9 +140,9 @@ class WP_Date_Query {
|
|||
* }
|
||||
* }
|
||||
* }
|
||||
* @param string $default_column Optional. Default column to query against. Default 'post_date'.
|
||||
* Accepts 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt',
|
||||
* 'comment_date', 'comment_date_gmt'.
|
||||
* @param string $default_column Optional. Default column to query against. See WP_Date_Query::validate_column()
|
||||
* and the {@see 'date_query_valid_columns'} filter for the list of accepted values.
|
||||
* Default 'post_date'.
|
||||
*/
|
||||
public function __construct( $date_query, $default_column = 'post_date' ) {
|
||||
if ( empty( $date_query ) || ! is_array( $date_query ) ) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51905';
|
||||
$wp_version = '5.9-alpha-51906';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue