Changeset 28421
- Timestamp:
- 05/15/2014 05:24:54 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r28415 r28421 3686 3686 * @param array $args Override the defaults. 3687 3687 */ 3688 function the_taxonomies( $args = array()) {3688 function the_taxonomies( $args = array() ) { 3689 3689 $defaults = array( 3690 3690 'post' => 0, … … 3696 3696 3697 3697 $r = wp_parse_args( $args, $defaults ); 3698 extract( $r, EXTR_SKIP ); 3699 3700 echo $before . join($sep, get_the_taxonomies($post, $r)) . $after; 3698 3699 echo $r['before'] . join( $r['sep'], get_the_taxonomies( $r['post'], $r ) ) . $r['after']; 3701 3700 } 3702 3701 -
trunk/tests/phpunit/tests/taxonomy.php
r28415 r28421 50 50 } 51 51 52 function test_the_taxonomies() { 53 $post_id = $this->factory->post->create(); 54 55 ob_start(); 56 the_taxonomies( array( 'post' => $post_id ) ); 57 $output = ob_get_clean(); 58 59 $link = get_category_link( 1 ); 60 $expected = "Categories: <a href='$link'>Uncategorized</a>."; 61 $this->assertEquals( $expected, $output ); 62 } 63 52 64 function test_get_link_taxonomy() { 53 65 foreach ( get_object_taxonomies('link') as $taxonomy ) {
Note: See TracChangeset
for help on using the changeset viewer.