Make WordPress Core

Changeset 7526


Ignore:
Timestamp:
03/26/2008 06:26:22 PM (18 years ago)
Author:
ryan
Message:

get_term_link() fixes for core taxonomies. Props andy. see #6357

File:
1 edited

Legend:

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

    r7520 r7526  
    19411941        global $wp_rewrite;
    19421942
     1943        // use legacy functions for core taxonomies until they are fully plugged in
     1944        if ( $taxonomy == 'category' )
     1945                return get_category_link($term);
     1946        if ( $taxonomy == 'post_tag' )
     1947                return get_tag_link($term);
     1948
    19431949        $termlink = $wp_rewrite->get_extra_permastruct($taxonomy);
    19441950
     
    19942000                return $taxonomies;
    19952001
    1996         $_template = '%s: %l.';
     2002        $template = apply_filters('taxonomy_template', '%s: %l.');
    19972003
    19982004        foreach ( get_object_taxonomies($post) as $taxonomy ) {
     
    20032009                        $t['args'] = array();
    20042010                if ( empty($t['template']) )
    2005                         $t['template'] = $_template;
     2011                        $t['template'] = $template;
    20062012
    20072013                $terms = get_object_term_cache($post->ID, $taxonomy);
Note: See TracChangeset for help on using the changeset viewer.