Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#34861 closed defect (bug) (fixed)

Improve documentation for wp_count_terms()

Reported by: swissspidy's profile swissspidy Owned by: bordoni's profile bordoni
Milestone: 4.5 Priority: normal
Severity: normal Version: 2.3
Component: Taxonomy Keywords: has-patch good-first-bug
Focuses: docs Cc:

Description (last modified by swissspidy)

wp_count_terms() takes an optional $args param that is passed to get_terms. Although that function is referenced in the docblock, it should probably use a proper @see reference. Duplicating the whole hash notation for $args probably doesn't make sense, though there's a @todo comment about it.

See the PHP documentation standards for more details.

Attachments (2)

core.34861.0.patch (1.2 KB) - added by bordoni 6 years ago.
PHP Code Std + Docblock changes
34861.diff (1.1 KB) - added by swissspidy 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 @swissspidy
6 years ago

  • Description modified (diff)

6 years ago

PHP Code Std + Docblock changes

#2 @bordoni
6 years ago

  • Keywords has-patch added; needs-patch good-first-bug removed
  • Version set to trunk

#3 @swissspidy
6 years ago

  • Keywords good-first-bug added
  • Owner set to bordoni
  • Status changed from new to assigned
  • Version changed from trunk to 2.3

Hi @bordoni, thanks for your patch!

Please note that code refactoring (even just adding spaces) shouldn't be done for the sake of refactoring. See for details. We're concentrating on the docblock here.

Besides that, Version is used to indicate the WordPress version this bug was first introduced and the good-first-bug keyword should remain. Instead, I'll set you as an owner here, marking this good-first-bug as claimed.

6 years ago

#4 @swissspidy
6 years ago

  • Milestone changed from Awaiting Review to 4.5

34861.diff is an updated patch without the coding standards changes; also removing the @todo from the DocBlock.

#5 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 35895:

Docs: Improve documentation for wp_count_terms().

Props bordoni, swissspidy.
Fixes #34861.

Note: See TracTickets for help on using tickets.