Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#19340 closed defect (bug) (duplicate)

unexpected result using wp_count_terms() function

Reported by: alex-ye's profile alex-ye Owned by: alex-ye's profile alex-ye
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Taxonomy Keywords:
Focuses: Cc:

Description

Hi I found a unexpected result when I testing wp_count_terms() function .

To get this error , Create a 3 categories

Catgory Name --- Posts Count


CAT 1 3
CAT 2 2
CAT 3 0


Example :
<?php echo wp_count_terms( 'catgory' , array ( 'hide_empty' => true ) ); ?>

The expected result :
2

What I get is :
3

I hope you fix the proplem .

Change History (3)

#1 @alex-ye
12 years ago

  • Owner set to alex-ye
  • Status changed from new to accepted

#2 @alex-ye
12 years ago

The categories example :

Catgory Name : CAT1 , Posts Count : 3

Catgory Name : CAT2 , Posts Count : 2

Catgory Name : CAT3 , Posts Count : 0

#3 @SergeyBiryukov
12 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.