WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks ago

#47877 closed enhancement (fixed)

register_taxonomy: argument type in docblock comment does not match with the parameter type

Reported by: audrasjb Owned by: SergeyBiryukov
Milestone: 5.3 Priority: low
Severity: normal Version:
Component: Taxonomy Keywords: good-first-bug
Focuses: docs Cc:

Description

In function register_taxonomy, located in /wp-includes/taxonomy.php:

 *     @type string        $query_var 

should be:

 *     @type bool|string        $query_var

since false could be passed as an argument for this parameter.

Current DevHub documentation:
"query_var - (string) Sets the query var key for this taxonomy. Default $taxonomy key. If false, a taxonomy cannot be loaded at ?{query_var}={term_slug}. If a string, the query ?{query_var}={term_slug} will be valid."

Attachments (1)

47877.diff (1.0 KB) - added by juiiee8487 5 weeks ago.
Created patch.

Download all attachments as: .zip

Change History (5)

#1 @audrasjb
5 weeks ago

  • Keywords good-first-bug added

@juiiee8487
5 weeks ago

Created patch.

#2 @juiiee8487
5 weeks ago

  • Keywords needs-patch removed

Added patch.

#3 @SergeyBiryukov
5 weeks ago

  • Milestone changed from Awaiting Review to 5.3

#4 @SergeyBiryukov
5 weeks ago

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

In 45797:

Docs: Correct type for query_var argument of register_taxonomy().

Props juiiee8487, audrasjb.
Fixes #47877.

Note: See TracTickets for help on using tickets.