WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2010 05:23:29 PM (10 years ago)
Author:
ryan
Message:

Introduce home_url(). Props Denis-de-Bernardy, hakre. see #9008

File:
1 edited

Legend:

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

    r12597 r12598  
    22472247
    22482248    if ( empty($termlink) ) {
    2249         $file = trailingslashit( get_option('home') );
    22502249        $t = get_taxonomy($taxonomy);
    22512250        if ( $t->query_var )
    2252             $termlink = "$file?$t->query_var=$slug";
     2251            $termlink = "?$t->query_var=$slug";
    22532252        else
    2254             $termlink = "$file?taxonomy=$taxonomy&term=$slug";
     2253            $termlink = "?taxonomy=$taxonomy&term=$slug";
     2254        $termlink = home_url($termlink);
    22552255    } else {
    22562256        $termlink = str_replace("%$taxonomy%", $slug, $termlink);
    2257         $termlink = get_option('home') . user_trailingslashit($termlink, 'category');
     2257        $termlink = home_url( user_trailingslashit($termlink, 'category') );
    22582258    }
    22592259    return apply_filters('term_link', $termlink, $term, $taxonomy);
Note: See TracChangeset for help on using the changeset viewer.