Ticket #30783: 30783.diff
File 30783.diff, 2.8 KB (added by , 9 years ago) |
---|
-
pluggable.php
2292 2292 if ( ! $args['found_avatar'] || $args['force_default'] ) { 2293 2293 $class[] = 'avatar-default'; 2294 2294 } 2295 if ( current_theme_suports( 'microformats2' ) ) { 2296 $class[] = 'u-photo'; 2297 } 2295 2298 2296 2299 if ( $args['class'] ) { 2297 2300 if ( is_array( $args['class'] ) ) { -
post-template.php
466 466 $classes[] = 'status-sticky'; 467 467 } 468 468 } 469 // Backward compatibility for old behavior. 470 if ( ! current_theme_supports( 'microformats2' ) ) { 471 // hentry for hAtom compliance 472 $classes[] = 'hentry'; 473 } 474 else { 475 // Add Microformats 2 on pages that contain multiple hentry/h-entrys. 476 if ( ! is_single() ) { 477 $classes[] = 'h-entry'; 478 $classes[] = 'hentry'; 479 } 480 } 469 481 470 // hentry for hAtom compliance471 $classes[] = 'hentry';472 473 482 // All public taxonomies 474 483 $taxonomies = get_taxonomies( array( 'public' => true ) ); 475 484 foreach ( (array) $taxonomies as $taxonomy ) { … … 563 572 if ( is_single() ) { 564 573 $post_id = $wp_query->get_queried_object_id(); 565 574 $post = $wp_query->get_queried_object(); 566 567 575 $classes[] = 'single'; 568 576 if ( isset( $post->post_type ) ) { 569 577 $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id); … … 705 713 elseif ( is_post_type_archive() ) 706 714 $classes[] = 'post-type-paged-' . $page; 707 715 } 716 // Support Microformats2 behavior. 717 if ( current_theme_supports( 'microformats2' ) ) { 718 if ( is_single() ) { 719 $classes[] = 'h-entry'; 720 $classes[] = 'hentry'; 721 } 722 else { 723 $classes[] = 'h-feed'; 724 $classes[] = 'hfeed'; 725 } 726 } 708 727 709 728 if ( ! empty( $class ) ) { 710 729 if ( !is_array( $class ) ) -
comment-template.php
209 209 $return = $author; 210 210 else 211 211 $return = "<a href='$url' rel='external nofollow' class='url'>$author</a>"; 212 if ( current_theme_supports( 'microformats2' ) ) { 213 $return = "<a href='$url' rel='external nofollow' class='url u-url'>$author</a>"; 214 } 212 215 213 216 /** 214 217 * Filter the comment author's link for display. … … 428 431 // Get the comment type (comment, trackback), 429 432 $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; 430 433 434 // Microformats2 Support. 435 if ( current_theme_supports( 'microformats2' ) ) { 436 $classes[] = 'p-comment'; 437 $classes[] = 'h-entry'; 438 } 439 431 440 // Add classes for comment authors that are registered users. 432 441 if ( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) ) { 433 442 $classes[] = 'byuser';