Changeset 11306
- Timestamp:
- 05/12/2009 05:11:57 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r11249 r11306 295 295 // For all registered users, 'byuser' 296 296 $classes[] = 'byuser'; 297 $classes[] = 'comment-author-' . $user->user_ nicename;297 $classes[] = 'comment-author-' . $user->user_id; 298 298 // For comment authors who are the author of the post 299 299 if ( $post = get_post($post_id) ) { -
trunk/wp-includes/post-template.php
r11300 r11306 312 312 313 313 $classes = array(); 314 314 315 $classes[] = 'post-' . $post->ID; 315 316 $classes[] = $post->post_type; 316 317 … … 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 … … 400 401 $mime_type = get_post_mime_type(); 401 402 $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' ); 402 $classes[] = 'attachmentid-' . $postID . ' attachment-' . str_replace( $mime_prefix, "", "$mime_type" ); 403 $classes[] = 'attachmentid-' . $postID; 404 $classes[] = 'attachment-' . str_replace($mime_prefix, '', $mime_type); 403 405 } 404 406 } elseif ( is_archive() ) { … … 406 408 $author = $wp_query->get_queried_object(); 407 409 $classes[] = 'author'; 408 $classes[] = 'author-' . $author->user_ nicename;410 $classes[] = 'author-' . $author->user_id; 409 411 } elseif ( is_category() ) { 410 412 $cat = $wp_query->get_queried_object(); 411 413 $classes[] = 'category'; 412 $classes[] = 'category-' . $cat-> slug;414 $classes[] = 'category-' . $cat->cat_ID; 413 415 } elseif ( is_tag() ) { 414 416 $tags = $wp_query->get_queried_object(); 415 417 $classes[] = 'tag'; 416 $classes[] = 'tag-' . $tags-> slug;418 $classes[] = 'tag-' . $tags->term_id; 417 419 } 418 420 } elseif ( is_page() ) { … … 430 432 431 433 if ( $wp_query->post->post_parent ) 432 $classes[] = 'page-child parent-pageid-' . $wp_query->post->post_parent; 434 $classes[] = 'page-child'; 435 $classes[] = 'parent-pageid-' . $wp_query->post->post_parent; 433 436 434 437 if ( is_page_template() ) 435 $classes[] = 'page-template page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) ); 438 $classes[] = 'page-template'; 439 $classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) ); 436 440 } elseif ( is_search() ) { 437 441 if ( !empty($wp_query->posts) )
Note: See TracChangeset
for help on using the changeset viewer.