Make WordPress Core

Opened 2 weeks ago

Closed 2 weeks ago

#54248 closed enhancement (fixed)

Update documentation of WP_Date_Query to reflect changes in accepted column names

Reported by: dimadin Owned by: SergeyBiryukov
Milestone: 5.9 Priority: normal
Severity: trivial Version:
Component: Date/Time Keywords: has-patch
Focuses: docs Cc:


When WP_Date_Query was introduced in [25139], column name was accepted only if it was from restricted list, or if filter was used. But in [29933], WP_Date_Query::validate_column() was changed so that any column name is accepted without need for filter if column name has table prefix.

Patch updates documentations for column name parameters by removing list of column names that are accepted (which was outdated anyway) and it points to WP_Date_Query::validate_column() with more detailed documentation.

Also, patch updates documentation of date_query_valid_columns filter since it wasn't updated when the latest change to the passed value was made in [37477].

Change History (6)

#2 @SergeyBiryukov
2 weeks ago

  • Milestone changed from Awaiting Review to 5.9

#3 @SergeyBiryukov
2 weeks ago

  • Component changed from General to Date/Time

#4 @johnjamesjacoby
2 weeks ago

👍 from me

#5 @SergeyBiryukov
2 weeks ago

In 51905:

Docs: Update documentation for the date_query_valid_columns filter.

Add a @since note for registered and last_updated as default recognized date query columns.

Follow-up to [25139], [25860], [29933], [29934], [29938], [37477].

Props dimadin, johnjamesjacoby.
See #54248.

#6 @SergeyBiryukov
2 weeks ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 51906:

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.

Note: See TracTickets for help on using tickets.