mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-09 00:51:35 +01:00
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 array ...$0 {
|
||||||
* @type string $column Optional. The column to query against. If undefined, inherits the value of
|
* @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',
|
* the `$default_column` parameter. See WP_Date_Query::validate_column() and
|
||||||
* 'post_modified','post_modified_gmt', 'comment_date', 'comment_date_gmt'.
|
* the {@see 'date_query_valid_columns'} filter for the list of accepted values.
|
||||||
* Default 'post_date'.
|
* Default 'post_date'.
|
||||||
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=',
|
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=',
|
||||||
* 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default '='.
|
* '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.
|
* @type string $day Optional when passing array.The day of the month. Accepts numbers 1-31.
|
||||||
* Default (string:empty)|(array:last day of month).
|
* Default (string:empty)|(array:last day of month).
|
||||||
* }
|
* }
|
||||||
* @type string $column Optional. Used to add a clause comparing a column other than the
|
* @type string $column Optional. Used to add a clause comparing a column other than
|
||||||
* column specified in the top-level `$column` parameter. Accepts
|
* the column specified in the top-level `$column` parameter.
|
||||||
* 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt',
|
* See WP_Date_Query::validate_column() and
|
||||||
* 'comment_date', 'comment_date_gmt'. Default is the value of
|
* the {@see 'date_query_valid_columns'} filter for the list
|
||||||
* top-level `$column`.
|
* of accepted values. Default is the value of top-level `$column`.
|
||||||
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=',
|
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=',
|
||||||
* '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN',
|
* '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN',
|
||||||
* 'NOT IN', 'BETWEEN', and 'NOT BETWEEN'. Comparisons support
|
* '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'.
|
* @param string $default_column Optional. Default column to query against. See WP_Date_Query::validate_column()
|
||||||
* Accepts 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt',
|
* and the {@see 'date_query_valid_columns'} filter for the list of accepted values.
|
||||||
* 'comment_date', 'comment_date_gmt'.
|
* Default 'post_date'.
|
||||||
*/
|
*/
|
||||||
public function __construct( $date_query, $default_column = 'post_date' ) {
|
public function __construct( $date_query, $default_column = 'post_date' ) {
|
||||||
if ( empty( $date_query ) || ! is_array( $date_query ) ) {
|
if ( empty( $date_query ) || ! is_array( $date_query ) ) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user