WordPress.org

Make WordPress Core

Ticket #8446: post-template.php.diff

File post-template.php.diff, 641 bytes (added by abackstrom, 13 years ago)

Use category-100 instead of category-myslug in get_post_class(). (Ditto for tags.)

  • wp-includes/post-template.php

     
    319319        foreach ( (array) get_the_category($post->ID) as $cat ) {
    320320                if ( empty($cat->slug ) )
    321321                        continue;
    322                 $classes[] = 'category-' . $cat->slug;
     322                $classes[] = 'category-' . $cat->term_id;
    323323        }
    324324
    325325        // Tags
    326326        foreach ( (array) get_the_tags($post->ID) as $tag ) {
    327327                if ( empty($tag->slug ) )
    328328                        continue;
    329                 $classes[] = 'tag-' . $tag->slug;
     329                $classes[] = 'tag-' . $tag->term_id;
    330330        }
    331331
    332332        if ( !empty($class) ) {