Changeset 16665
- Timestamp:
- 12/01/2010 08:16:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r16555 r16665 2776 2776 * 'sep' : default is empty string. Separate every taxonomy with value in this. 2777 2777 * 'after' : default is empty string. Display this after the taxonomies list. 2778 * 'template' : The template to use for displaying the taxonomy terms. 2778 2779 * 2779 2780 * @since 2.5.0 … … 2788 2789 'sep' => ' ', 2789 2790 'after' => '', 2791 'template' => '%s: %l.' 2790 2792 ); 2791 2793 … … 2793 2795 extract( $r, EXTR_SKIP ); 2794 2796 2795 echo $before . join($sep, get_the_taxonomies($post )) . $after;2797 echo $before . join($sep, get_the_taxonomies($post, $template)) . $after; 2796 2798 } 2797 2799 … … 2805 2807 * 2806 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. 2807 2810 * @return array 2808 2811 */ 2809 function get_the_taxonomies($post = 0 ) {2812 function get_the_taxonomies($post = 0, $template = '%s: %l.') { 2810 2813 if ( is_int($post) ) 2811 2814 $post =& get_post($post); … … 2817 2820 if ( !$post ) 2818 2821 return $taxonomies; 2819 2820 $template = apply_filters('taxonomy_template', '%s: %l.');2821 2822 2822 2823 foreach ( get_object_taxonomies($post) as $taxonomy ) {
Note: See TracChangeset
for help on using the changeset viewer.