[wp-trac] [WordPress Trac] #19340: unexpected result using wp_count_terms() function

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 23 14:23:24 UTC 2011


#19340: unexpected result using wp_count_terms() function
--------------------------+-----------------------------
 Reporter:  alex-ye       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  3.2.1
 Severity:  normal        |   Keywords:  needs-patch
--------------------------+-----------------------------
 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 .

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19340>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list