Make WordPress Core


Ignore:
Timestamp:
05/09/2004 02:52:27 AM (22 years ago)
Author:
saxmatt
Message:

Fixes for silly category_base stuff. Now lets it be blank and acts accordingly, more sane.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-category.php

    r1235 r1244  
    2525        $link = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID;
    2626    } else {
    27         $category_nicename = $cache_categories[$category_id]->cat_name;
    28         $category_nicename = preg_replace( '|[^a-z0-9-]|i', '', $category_nicename );
     27        $category_nicename = $cache_categories[$category_id]->category_nicename;
    2928        // Get any static stuff from the front
    3029        $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
     30        if ( '' == get_settings('category_base') ) :
     31            $link = get_settings('home') . $front . 'category/';
     32        else :
    3133         $link = get_settings('home') . get_settings('category_base') . '/';
     34        endif;
    3235        if ($parent=$cache_categories[$category_id]->category_parent) $link .= get_category_parents($parent, FALSE, '/', TRUE);
    3336        $link .= $category_nicename . '/';
Note: See TracChangeset for help on using the changeset viewer.