Make WordPress Core

Changeset 16331


Ignore:
Timestamp:
11/12/2010 06:40:51 PM (14 years ago)
Author:
scribu
Message:

Don't use deprecated category properties. Props filosofo. Fixes #15408

Location:
trunk/wp-includes
Files:
3 edited

Legend:

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

    r16317 r16331  
    4141        $name = $parent->slug;
    4242    else
    43         $name = $parent->cat_name;
     43        $name = $parent->name;
    4444
    4545    if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {
     
    4949
    5050    if ( $link )
    51         $chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $parent->cat_name ) ) . '">'.$name.'</a>' . $separator;
     51        $chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $parent->name ) ) . '">'.$name.'</a>' . $separator;
    5252    else
    5353        $chain .= $name.$separator;
     
    184184                case '':
    185185                default:
    186                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->cat_name.'</a></li>';
     186                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
    187187            }
    188188        }
     
    197197                    if ( $category->parent )
    198198                        $thelist .= get_category_parents( $category->parent, true, $separator );
    199                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->cat_name.'</a>';
     199                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a>';
    200200                    break;
    201201                case 'single':
     
    203203                    if ( $category->parent )
    204204                        $thelist .= get_category_parents( $category->parent, false, $separator );
    205                     $thelist .= "$category->cat_name</a>";
     205                    $thelist .= "$category->name</a>";
    206206                    break;
    207207                case '':
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r16256 r16331  
    947947        foreach ( (array) get_categories($args) as $cat ) {
    948948            $category_suggestions[] = array(
    949                 "category_id"   => $cat->cat_ID,
    950                 "category_name" => $cat->cat_name
     949                "category_id"   => $cat->term_id,
     950                "category_name" => $cat->name
    951951            );
    952952        }
  • trunk/wp-includes/post-template.php

    r16315 r16331  
    353353            if ( empty($cat->slug ) )
    354354                continue;
    355             $classes[] = 'category-' . sanitize_html_class($cat->slug, $cat->cat_ID);
     355            $classes[] = 'category-' . sanitize_html_class($cat->slug, $cat->term_id);
    356356        }
    357357    }
Note: See TracChangeset for help on using the changeset viewer.