Make WordPress Core


Ignore:
Timestamp:
11/30/2008 07:29:46 PM (16 years ago)
Author:
ryan
Message:

Fix notice

File:
1 edited

Legend:

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

    r9838 r9987  
    110110        if ( strpos($permalink, '%category%') !== false ) {
    111111            $cats = get_the_category($post->ID);
    112             if ( $cats )
     112            if ( $cats ) {
    113113                usort($cats, '_usort_terms_by_ID'); // order by ID
    114             $category = $cats[0]->slug;
    115             if ( $parent=$cats[0]->parent )
    116                 $category = get_category_parents($parent, false, '/', true) . $category;
    117 
     114                $category = $cats[0]->slug;
     115                if ( $parent = $cats[0]->parent )
     116                    $category = get_category_parents($parent, false, '/', true) . $category;
     117            }
    118118            // show default category in permalinks, without
    119119            // having to assign it explicitly
Note: See TracChangeset for help on using the changeset viewer.