Changeset 2551
- Timestamp:
- 04/19/2005 05:17:36 PM (20 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/feed-functions.php
r2472 r2551 107 107 } 108 108 109 function get_category_rss_link($echo = false, $category_id, $category_nicename) { 110 $cat_ID = $category_id; 109 function get_category_rss_link($echo = false, $cat_ID, $category_nicename) { 111 110 $permalink_structure = get_settings('permalink_structure'); 112 111 -
trunk/wp-includes/functions.php
r2550 r2551 592 592 if ( !isset($cache_categories[$category]) ) { 593 593 $category = $wpdb->get_row("SELECT * FROM $wpdb->categories WHERE cat_ID = $category"); 594 $category->category_id = $category->cat_ID; // Alias.595 594 $cache_categories[$category->cat_ID] = & $category; 596 595 } else { … … 1124 1123 1125 1124 $dogs = $wpdb->get_results("SELECT DISTINCT 1126 post_id, cat egory_idFROM $wpdb->categories, $wpdb->post2cat1125 post_id, cat_ID FROM $wpdb->categories, $wpdb->post2cat 1127 1126 WHERE category_id = cat_ID AND post_id IN ($post_ids)"); 1128 1127 … … 1132 1131 if ( !empty($dogs) ) { 1133 1132 foreach ($dogs as $catt) { 1134 $category_cache[$catt->post_id][$catt->cat egory_id] = &$cache_categories[$catt->category_id];1133 $category_cache[$catt->post_id][$catt->cat_ID] = &$cache_categories[$catt->cat_ID]; 1135 1134 } 1136 1135 } … … 1190 1189 function update_category_cache() { 1191 1190 global $cache_categories, $wpdb; 1192 $dogs = $wpdb->get_results("SELECT * , cat_ID as category_idFROM $wpdb->categories");1191 $dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories"); 1193 1192 foreach ($dogs as $catt) 1194 1193 $cache_categories[$catt->cat_ID] = $catt; -
trunk/wp-includes/template-functions-category.php
r2478 r2551 57 57 $thelist .= get_category_parents($category->category_parent, TRUE); 58 58 } 59 $thelist .= '<a href="' . get_category_link($category->cat egory_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a></li>';59 $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a></li>'; 60 60 break; 61 61 case 'single': 62 $thelist .= '<a href="' . get_category_link($category->cat egory_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . ' rel="category tag">';62 $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . ' rel="category tag">'; 63 63 if ($category->category_parent) { 64 64 $thelist .= get_category_parents($category->category_parent, FALSE); … … 68 68 case '': 69 69 default: 70 $thelist .= '<a href="' . get_category_link($category->cat egory_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a></li>';70 $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a></li>'; 71 71 } 72 72 } … … 80 80 case 'multiple': 81 81 if ($category->category_parent) $thelist .= get_category_parents($category->category_parent, TRUE); 82 $thelist .= '<a href="' . get_category_link($category->cat egory_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>';82 $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>'; 83 83 break; 84 84 case 'single': 85 $thelist .= '<a href="' . get_category_link($category->cat egory_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">';85 $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'; 86 86 if ($category->category_parent) $thelist .= get_category_parents($category->category_parent, FALSE); 87 87 $thelist .= "$category->cat_name</a>"; … … 89 89 case '': 90 90 default: 91 $thelist .= '<a href="' . get_category_link($category->cat egory_id) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>';91 $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>'; 92 92 } 93 93 ++$i; … … 140 140 // Grab the first cat in the list. 141 141 $categories = get_the_category(); 142 $cat = $categories[0]->cat egory_id;142 $cat = $categories[0]->cat_ID; 143 143 144 144 if ($echo) echo $cat; … … 289 289 290 290 if ( $optiondates ) { 291 $cat_dates = $wpdb->get_results(" SELECT cat egory_id,291 $cat_dates = $wpdb->get_results(" SELECT cat_ID, 292 292 UNIX_TIMESTAMP( MAX(post_date) ) AS ts 293 293 FROM $wpdb->posts, $wpdb->post2cat … … 295 295 GROUP BY category_id"); 296 296 foreach ($cat_dates as $cat_date) { 297 $category_timestamp["$cat_date->cat egory_id"] = $cat_date->ts;297 $category_timestamp["$cat_date->cat_ID"] = $cat_date->ts; 298 298 } 299 299 } … … 387 387 $cats = ''; 388 388 foreach ($category_cache[$post->ID] as $cat) : 389 $cats[] = $cat->cat egory_id;389 $cats[] = $cat->cat_ID; 390 390 endforeach; 391 391
Note: See TracChangeset
for help on using the changeset viewer.