Changeset 25551
- Timestamp:
- 09/21/2013 04:47:43 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r25498 r25551 1370 1370 } 1371 1371 1372 if ( 'count' == $fields ) 1373 $hierarchical = false; 1374 1372 1375 if ( $hide_empty && !$hierarchical ) 1373 1376 $where .= ' AND tt.count > 0'; -
trunk/tests/phpunit/tests/term.php
r25334 r25551 506 506 $this->assertEquals( get_term( $term1['term_id'], 'category' ), $term2 ); 507 507 } 508 509 function test_wp_count_terms() { 510 $count = wp_count_terms( 'category', array( 'hide_empty' => true ) ); 511 // the terms inserted in setUp aren't attached to any posts, so should return 0 512 // this previously returned 2 513 $this->assertEquals( 0, $count ); 514 } 508 515 }
Note: See TracChangeset
for help on using the changeset viewer.