Make WordPress Core


Ignore:
Timestamp:
04/19/2005 05:17:36 PM (20 years ago)
Author:
matt
Message:

More consistent use of cat_ID vs category_id

File:
1 edited

Legend:

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

    r2478 r2551  
    5757                        $thelist .= get_category_parents($category->category_parent, TRUE);
    5858                    }
    59                     $thelist .= '<a href="' . get_category_link($category->category_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>';
    6060                    break;
    6161                case 'single':
    62                     $thelist .= '<a href="' . get_category_link($category->category_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">';
    6363                    if ($category->category_parent) {
    6464                        $thelist .= get_category_parents($category->category_parent, FALSE);
     
    6868                case '':
    6969                default:
    70                     $thelist .= '<a href="' . get_category_link($category->category_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>';
    7171            }
    7272        }
     
    8080                case 'multiple':
    8181                    if ($category->category_parent)    $thelist .= get_category_parents($category->category_parent, TRUE);
    82                     $thelist .= '<a href="' . get_category_link($category->category_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>';
    8383                    break;
    8484                case 'single':
    85                     $thelist .= '<a href="' . get_category_link($category->category_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">';
    8686                    if ($category->category_parent)    $thelist .= get_category_parents($category->category_parent, FALSE);
    8787                    $thelist .= "$category->cat_name</a>";
     
    8989                case '':
    9090                default:
    91                     $thelist .= '<a href="' . get_category_link($category->category_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>';
    9292            }
    9393            ++$i;
     
    140140    // Grab the first cat in the list.
    141141    $categories = get_the_category();
    142     $cat = $categories[0]->category_id;
     142    $cat = $categories[0]->cat_ID;
    143143   
    144144    if ($echo) echo $cat;
     
    289289   
    290290    if ( $optiondates ) {
    291         $cat_dates = $wpdb->get_results("   SELECT category_id,
     291        $cat_dates = $wpdb->get_results("   SELECT cat_ID,
    292292        UNIX_TIMESTAMP( MAX(post_date) ) AS ts
    293293        FROM $wpdb->posts, $wpdb->post2cat
     
    295295        GROUP BY category_id");
    296296        foreach ($cat_dates as $cat_date) {
    297             $category_timestamp["$cat_date->category_id"] = $cat_date->ts;
     297            $category_timestamp["$cat_date->cat_ID"] = $cat_date->ts;
    298298        }
    299299    }
     
    387387    $cats = '';
    388388    foreach ($category_cache[$post->ID] as $cat) :
    389         $cats[] = $cat->category_id;
     389        $cats[] = $cat->cat_ID;
    390390    endforeach;
    391391
Note: See TracChangeset for help on using the changeset viewer.