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/view-templates/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            <# if ( data.is_outdated ) { #>
    1212            <div class="theme-notice notice notice-warning notice-alt">
     
    1616
    1717            <div>
    18                 <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3>
     18                <h3 class="theme-name entry-title">{{{ data.name }}}</h3>
    1919                <# if ( data.author.display_name ) { #>
    20                 <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="{{{ data.path }}}author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
     20                <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="{{{ data.path }}}author/{{ data.author.user_nicename }}/"><span class="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
    2121                <# } #>
    2222
     
    6363                <# } #>
    6464
    65                 <div class="theme-description entry-summary" itemprop="description"><p>{{{ data.description }}}</p></div>
     65                <div class="theme-description entry-summary"><p>{{{ data.description }}}</p></div>
    6666
    6767                <# if ( data.tags ) { #>
     
    7979
    8080            <div class="theme-meta">
    81                 <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    82                     <meta itemprop="ratingCount" content="{{ data.num_ratings }}"/>
     81                <div class="theme-ratings">
    8382                    <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4>
    8483
     
    9291                        <span class="four"></span>
    9392                        <span class="five"></span>
    94                         <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">{{ Math.round( data.rating / 20 / 0.5 )*0.5 }}</span>' ); ?></p>
     93                        <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span>{{ Math.round( data.rating / 20 / 0.5 )*0.5 }}</span>' ); ?></p>
    9594                    </div>
    9695                    <# } else { #>
Note: See TracChangeset for help on using the changeset viewer.