Make WordPress Core

Changeset 16665


Ignore:
Timestamp:
12/01/2010 08:16:24 PM (14 years ago)
Author:
scribu
Message:

Get rid of misplaced 'taxonomy_template' filter. Fixes #14740

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r16555 r16665  
    27762776 * 'sep' : default is empty string. Separate every taxonomy with value in this.
    27772777 * 'after' : default is empty string. Display this after the taxonomies list.
     2778 * 'template' : The template to use for displaying the taxonomy terms.
    27782779 *
    27792780 * @since 2.5.0
     
    27882789        'sep' => ' ',
    27892790        'after' => '',
     2791        'template' => '%s: %l.'
    27902792    );
    27912793
     
    27932795    extract( $r, EXTR_SKIP );
    27942796
    2795     echo $before . join($sep, get_the_taxonomies($post)) . $after;
     2797    echo $before . join($sep, get_the_taxonomies($post, $template)) . $after;
    27962798}
    27972799
     
    28052807 *
    28062808 * @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.
    28072810 * @return array
    28082811 */
    2809 function get_the_taxonomies($post = 0) {
     2812function get_the_taxonomies($post = 0, $template = '%s: %l.') {
    28102813    if ( is_int($post) )
    28112814        $post =& get_post($post);
     
    28172820    if ( !$post )
    28182821        return $taxonomies;
    2819 
    2820     $template = apply_filters('taxonomy_template', '%s: %l.');
    28212822
    28222823    foreach ( get_object_taxonomies($post) as $taxonomy ) {
Note: See TracChangeset for help on using the changeset viewer.