Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#47877 closed enhancement (fixed)

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

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


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 years ago.
Created patch.

Download all attachments as: .zip

Change History (5)

#1 @audrasjb
5 years ago

  • Keywords good-first-bug added

5 years ago

Created patch.

#2 @juiiee8487
5 years ago

  • Keywords needs-patch removed

Added patch.

#3 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3

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