Ticket #6357: 6357-legacy.diff

File 6357-legacy.diff, 1.1 kB (added by andy, 5 months ago)
  • wp-includes/taxonomy.php

    old new  
    19401940function get_term_link( $term, $taxonomy ) { 
    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 
    19451951        if ( !is_object($term) ) { 
     
    19931999        if ( !$post ) 
    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 ) { 
    19992005                $t = (array) get_taxonomy($taxonomy); 
     
    20022008                if ( empty($t['args']) ) 
    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); 
    20082014                if ( empty($terms) )