Ticket #14740: args.14740.diff
File args.14740.diff, 1.4 KB (added by , 14 years ago) |
---|
-
wp-includes/taxonomy.php
2794 2794 $r = wp_parse_args( $args, $defaults ); 2795 2795 extract( $r, EXTR_SKIP ); 2796 2796 2797 echo $before . join($sep, get_the_taxonomies($ post, $template)) . $after;2797 echo $before . join($sep, get_the_taxonomies($r)) . $after; 2798 2798 } 2799 2799 2800 2800 /** … … 2802 2802 * 2803 2803 * This function can be used within the loop. It will also return an array of 2804 2804 * the taxonomies with links to the taxonomy and name. 2805 2806 * The available defaults are: 2807 * 'post' : default is 0. The post ID to get taxonomies of. 2808 * 'template' : The template to use for displaying the taxonomy terms. 2805 2809 * 2806 2810 * @since 2.5.0 2807 2811 * 2808 * @param int $post Optional. Post ID or will use Global Post ID (in loop). 2809 * @param string $template Optional. The template to use for displaying the taxonomy terms. 2812 * @param array $args Override the defaults. 2810 2813 * @return array 2811 2814 */ 2812 function get_the_taxonomies($post = 0, $template = '%s: %l.') { 2815 function get_the_taxonomies( $args = array() ) { 2816 if ( !is_array( $args ) ) { 2817 $args = array( 'post' => $args ); 2818 } 2819 2820 $defaults = array( 2821 'post' => 0, 2822 'template' => '%s: %l.' 2823 ); 2824 2825 $r = wp_parse_args( $args, $defaults ); 2826 extract( $r, EXTR_SKIP ); 2827 2813 2828 if ( is_int($post) ) 2814 2829 $post =& get_post($post); 2815 2830 elseif ( !is_object($post) )