Changeset 5576
- Timestamp:
- 05/28/2007 06:47:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r5575 r5576 74 74 if (strpos($permalink, '%category%') !== false) { 75 75 $cats = get_the_category($post->ID); 76 $category = $cats[0]-> category_nicename;77 if ( $parent=$cats[0]-> category_parent )76 $category = $cats[0]->slug; 77 if ( $parent=$cats[0]->parent ) 78 78 $category = get_category_parents($parent, FALSE, '/', TRUE) . $category; 79 79 } … … 360 360 $join = " INNER JOIN $wpdb->post2cat ON $wpdb->posts.ID= $wpdb->post2cat.post_id "; 361 361 $cat_array = get_the_category($post->ID); 362 $join .= ' AND (category_id = ' . intval($cat_array[0]-> cat_ID);362 $join .= ' AND (category_id = ' . intval($cat_array[0]->term_id); 363 363 for ( $i = 1; $i < (count($cat_array)); $i++ ) { 364 $join .= ' OR category_id = ' . intval($cat_array[$i]-> cat_ID);364 $join .= ' OR category_id = ' . intval($cat_array[$i]->term_id); 365 365 } 366 366 $join .= ')'; … … 397 397 $join = " INNER JOIN $wpdb->post2cat ON $wpdb->posts.ID= $wpdb->post2cat.post_id "; 398 398 $cat_array = get_the_category($post->ID); 399 $join .= ' AND (category_id = ' . intval($cat_array[0]-> cat_ID);399 $join .= ' AND (category_id = ' . intval($cat_array[0]->term_id); 400 400 for ( $i = 1; $i < (count($cat_array)); $i++ ) { 401 $join .= ' OR category_id = ' . intval($cat_array[$i]-> cat_ID);401 $join .= ' OR category_id = ' . intval($cat_array[$i]->term_id); 402 402 } 403 403 $join .= ')';
Note: See TracChangeset
for help on using the changeset viewer.