Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#54248 closed enhancement (fixed)

Update documentation of WP_Date_Query to reflect changes in accepted column names

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

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
5 years ago

  • Milestone Awaiting Review5.9

#3 @SergeyBiryukov
5 years ago

  • Component GeneralDate/Time

#4 @johnjamesjacoby
5 years ago

👍 from me

#5 @SergeyBiryukov
5 years 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
5 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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:


5 years ago
#7

Merged in [51905] and [51906].

Note: See TracTickets for help on using tickets.