Changeset 36618
- Timestamp:
- 02/22/2016 11:17:21 PM (9 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/common.css
r36612 r36618 2520 2520 #plugin-information .fyi li { 2521 2521 margin: 0 0 10px; 2522 } 2523 2524 #plugin-information .fyi-description { 2525 margin-top: 0; 2522 2526 } 2523 2527 -
trunk/src/wp-admin/includes/plugin-install.php
r36297 r36618 538 538 echo "</div>\n"; 539 539 540 $date_format = __( 'M j, Y @ H:i' );541 542 if ( ! empty( $api->last_updated ) ) {543 $last_updated_timestamp = strtotime( $api->last_updated );544 }545 546 540 ?> 547 541 <div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'> … … 553 547 <li><strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?></li> 554 548 <?php } if ( ! empty( $api->last_updated ) ) { ?> 555 <li><strong><?php _e( 'Last Updated:' ); ?></strong> <span title="<?php echo esc_attr( date_i18n( $date_format, $last_updated_timestamp ) ); ?>">556 <?php printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp) ); ?>557 </ span></li>549 <li><strong><?php _e( 'Last Updated:' ); ?></strong> 550 <?php printf( __( '%s ago' ), human_time_diff( strtotime( $api->last_updated ) ) ); ?> 551 </li> 558 552 <?php } if ( ! empty( $api->requires ) ) { ?> 559 553 <li><strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?></li> … … 579 573 <h3><?php _e( 'Average Rating' ); ?></h3> 580 574 <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> 581 < small aria-hidden="true"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small>575 <p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p> 582 576 <?php } 583 577 584 if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { 578 if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { ?> 579 <h3><?php _e( 'Reviews' ); ?></h3> 580 <p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p> 581 <?php 585 582 foreach ( $api->ratings as $key => $ratecount ) { 586 583 // Avoid div-by-zero. 587 584 $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0; 585 /* translators: 1: number of stars, 2: number of reviews */ 586 $aria_label = esc_attr( sprintf( _n( 'Reviews with %1$d star: %2$d. Opens in a new window.', 'Reviews with %1$d stars: %2$d. Opens in a new window.', $key ), 587 $key, 588 number_format_i18n( $ratecount ) 589 ) ); 588 590 ?> 589 591 <div class="counter-container"> 590 592 <span class="counter-label"><a href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>" 591 target="_blank" 592 title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key ), $key ) ); ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span> 593 target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span> 593 594 <span class="counter-back"> 594 595 <span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span> 595 596 </span> 596 <span class="counter-count" ><?php echo number_format_i18n( $ratecount ); ?></span>597 <span class="counter-count" aria-hidden="true"><?php echo number_format_i18n( $ratecount ); ?></span> 597 598 </div> 598 599 <?php
Note: See TracChangeset
for help on using the changeset viewer.