WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#10746 closed defect (bug) (fixed)

wp_count_terms() should call get_terms()

Reported by: scribu Owned by: dd32
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.8.4
Component: Taxonomy Keywords: has-patch commit
Focuses: Cc:

Description

Currently, wp_count_terms() only accepts one argument: 'ignore_empty'.

get_terms() has alot more, so why not use it to also count the terms?

As a direct benefit, we can correct the pagination in wp-admin/edit-tags.php?s=something which ignores the search parameter.

Attachments (2)

wp_count_terms.diff (3.3 KB) - added by scribu 5 years ago.
wp_count_terms.2.diff (3.8 KB) - added by scribu 4 years ago.
refresh

Download all attachments as: .zip

Change History (8)

scribu5 years ago

comment:1 ryan4 years ago

  • Milestone changed from 2.9 to 3.0

Seems okay for 3.0.

comment:2 scribu4 years ago

  • Keywords commit added

comment:3 scribu4 years ago

  • Keywords needs-patch added; has-patch commit removed

Ups... patch got stale.

scribu4 years ago

refresh

comment:4 scribu4 years ago

  • Keywords has-patch commit added; needs-patch removed

Refreshed patch: wp_count_terms.2.diff

comment:5 dd324 years ago

  • Owner changed from filosofo to dd32
  • Status changed from new to reviewing

comment:6 dd324 years ago

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

(In [13491]) Use get_terms() in wp_count_terms(). Props scribu. Fixes #10746

Note: See TracTickets for help on using tickets.