Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#53467 closed enhancement (fixed)

Correct and standardise the meta query documentation

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch dev-feedback
Focuses: docs Cc:

Description

The following query classes all support meta_* arguments because they pass their arguments onto WP_Meta_Query, however their documentation is inconsistent, incomplete, and in some cases incorrect.

  • WP_Comment_Query
  • WP_Query
  • WP_Site_Query
  • WP_Term_Query
  • WP_User_Query

Notably, WP_Query documents a meta_value_num argument which does not exist. This was erroneously introduced in [28887]. meta_value_num is an allowed value for orderby arguments, but is not the name of an argument itself.

Let's standardise the documentation and guide users to WP_Meta_Query for the canonical documentation.

Change History (9)

This ticket was mentioned in PR #1399 on WordPress/wordpress-develop by johnbillion.


3 years ago
#1

  • Keywords has-patch added

#2 @johnbillion
3 years ago

  • Keywords dev-feedback added

#3 @SergeyBiryukov
3 years ago

  • Component changed from General to Query

#4 @desrosj
3 years ago

  • Milestone changed from Awaiting Review to 5.9

audrasjb commented on PR #1399:


2 years ago
#5

@johnbillion I resolved the conflicts, but I left the indentation as it was in your previous proposal.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

#8 @johnbillion
2 years ago

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

In 52226:

Query: Correct and standardise the meta query documentation.

Also improves the formatting of some surrounding documentation.

Props audrasjb, johnbillion

Fixes #53467

Note: See TracTickets for help on using tickets.