Making WordPress.org

Changeset 1358


Ignore:
Timestamp:
02/28/2015 04:48:44 PM (9 years ago)
Author:
obenland
Message:

WP.org Themes: Proper schema.org markup for themes.

Props nataliemac.
See r1354.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php

    r1356 r1358  
    44?>
    55<div class="theme-wrap">
    6     <div class="theme-about hentry">
     6    <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork">
    77
    88        <?php if ( strtotime( '-2 years' ) > get_post_modified_time() ) : ?>
     
    1313
    1414        <div class="theme-head">
    15             <h3 class="theme-name entry-title"><?php the_title(); ?></h3>
     15            <h3 class="theme-name entry-title" itemprop="name"><?php the_title(); ?></h3>
    1616            <h4 class="theme-author">
    17                 <?php printf( _x( 'By %s', 'post author', 'wporg-themes' ), sprintf( '<a href="https://profiles.wordpress.org/%s"><span class="author">%s</span></a>', get_the_author_meta( 'login' ), esc_html( get_the_author() ) ) ); ?>
     17                <?php printf( _x( 'By %s', 'post author', 'wporg-themes' ), sprintf( '<a href="https://profiles.wordpress.org/%s"><span class="author" itemprop="author">%s</span></a>', get_the_author_meta( 'login' ), esc_html( get_the_author() ) ) ); ?>
    1818            </h4>
    1919
     
    3636            <div class="screenshot"><?php the_post_thumbnail( '798' ); ?></div>
    3737
    38             <div class="theme-description entry-summary"><?php the_content(); ?></div>
     38            <div class="theme-description entry-summary" itemprop="description"><?php the_content(); ?></div>
    3939
    4040            <div class="theme-tags">
     
    102102        <div class="theme-meta">
    103103            <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    104                 <meta itemprop="itemReviewed" content="<?php echo esc_attr( $theme->name ); ?>" />
    105104                <meta itemprop="ratingValue" content="<?php echo esc_attr( number_format_i18n( $theme->rating / 20, 1 ) ); ?>"/>
    106105                <meta itemprop="ratingCount" content="<?php echo esc_attr( $theme->num_ratings ); ?>"/>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php

    r1354 r1358  
    88        </div>
    99
    10         <div class="theme-about hentry">
     10        <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork">
    1111            <# if ( data.is_outdated ) { #>
    1212            <div class="theme-notice notice notice-warning">
     
    1616
    1717            <div class="theme-head">
    18                 <h3 class="theme-name entry-title">{{{ data.name }}}</h3>
    19                 <h4 class="theme-author"><?php printf( __( 'By %s' ), '<a href="https://profiles.wordpress.org/{{ data.author.user_nicename }}"><span class="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
     18                <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3>
     19                <h4 class="theme-author"><?php printf( __( 'By %s' ), '<a href="https://profiles.wordpress.org/{{ data.author.user_nicename }}"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
    2020
    2121                <div class="theme-actions">
     
    3838                <# } #>
    3939
    40                 <div class="theme-description entry-summary"><p>{{{ data.description }}}</p></div>
     40                <div class="theme-description entry-summary" itemprop="description"><p>{{{ data.description }}}</p></div>
    4141
    4242                <# if ( data.tags ) { #>
Note: See TracChangeset for help on using the changeset viewer.