Ticket #8446: 8446.patch
| File 8446.patch, 906 bytes (added by , 17 years ago) |
|---|
-
wp-includes/post-template.php
311 311 $post = get_post($post_id); 312 312 313 313 $classes = array(); 314 314 315 $classes[] = 'post-' . $post->ID; 315 316 $classes[] = $post->post_type; 316 317 317 318 // sticky for Sticky Posts … … 323 324 324 325 // Categories 325 326 foreach ( (array) get_the_category($post->ID) as $cat ) { 326 if ( empty($cat-> slug) )327 if ( empty($cat->cat_ID ) ) 327 328 continue; 328 $classes[] = 'category-' . $cat-> slug;329 $classes[] = 'category-' . $cat->cat_ID; 329 330 } 330 331 331 332 // Tags 332 333 foreach ( (array) get_the_tags($post->ID) as $tag ) { 333 if ( empty($tag-> slug) )334 if ( empty($tag->term_id ) ) 334 335 continue; 335 $classes[] = 'tag-' . $tag-> slug;336 $classes[] = 'tag-' . $tag->term_id; 336 337 } 337 338 338 339 if ( !empty($class) ) {