Make WordPress Core

Opened 16 months ago

Closed 16 months ago

Last modified 15 months ago

#54248 closed enhancement (fixed)

Update documentation of WP_Date_Query to reflect changes in accepted column names

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

Description

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 (7)

#2 @SergeyBiryukov
16 months ago

  • Milestone changed from Awaiting Review to 5.9

#3 @SergeyBiryukov
16 months ago

  • Component changed from General to Date/Time

#4 @johnjamesjacoby
16 months ago

👍 from me

#5 @SergeyBiryukov
16 months 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
16 months 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.

dimadin commented on PR #1753:


15 months ago
#7

Merged in [51905] and [51906].

Note: See TracTickets for help on using tickets.