Making WordPress.org


Ignore:
Timestamp:
02/24/2020 07:29:25 AM (5 years ago)
Author:
dd32
Message:

Theme Directory: Swap out inline metadata for a JSON+LD object.

Fixes #5037.

File:
1 edited

Legend:

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

    r9346 r9533  
    88    </div>
    99    <div class="theme-wrap">
    10         <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork">
     10        <div class="theme-about hentry">
    1111            <?php if ( time() - strtotime( $theme->last_updated ) > 2 * YEAR_IN_SECONDS ) { ?>
    1212            <div class="theme-notice notice notice-warning notice-alt">
     
    1616
    1717            <div>
    18                 <h3 class="theme-name entry-title" itemprop="name"><?php echo esc_html( $theme->name ); ?></h3>
     18                <h3 class="theme-name entry-title"><?php echo esc_html( $theme->name ); ?></h3>
    1919                <?php if ( $theme->author->display_name ) { ?>
    20                 <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/' . $theme->author->user_nicename . '/"><span class="author" itemprop="author">' . esc_html( $theme->author->display_name ) . '</span></a>' ); ?></h4>
     20                <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/' . $theme->author->user_nicename . '/"><span class="author">' . esc_html( $theme->author->display_name ) . '</span></a>' ); ?></h4>
    2121                <?php } ?>
    2222
     
    8484                <?php } ?>
    8585
    86                 <div class="theme-description entry-summary" itemprop="description"><p><?php echo esc_html( $theme->description ); ?></p></div>
     86                <div class="theme-description entry-summary"><p><?php echo esc_html( $theme->description ); ?></p></div>
    8787
    8888                <?php if ( $theme->tags ) { ?>
     
    108108
    109109            <div class="theme-meta">
    110                 <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    111                     <meta itemprop="ratingCount" content="<?php echo $theme->num_ratings; ?>"/>
     110                <div class="theme-ratings">
    112111                    <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4>
    113112
     
    121120                        <span class="four"></span>
    122121                        <span class="five"></span>
    123                         <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">' . round( $theme->rating / 20 / 0.5 )*0.5 . '</span>' ); ?></p>
     122                        <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span>' . round( $theme->rating / 20 / 0.5 )*0.5 . '</span>' ); ?></p>
    124123                    </div>
    125124                    <?php } else { ?>
Note: See TracChangeset for help on using the changeset viewer.