Ticket #35111: 35111.2.patch
File 35111.2.patch, 4.5 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
2521 2521 color: #464646; 2522 2522 } 2523 2523 2524 #plugin-information .last-updated-extended { 2525 display: block; 2526 } 2527 2524 2528 #plugin-information .fyi h3 { 2525 2529 font-weight: bold; 2526 2530 text-transform: uppercase; … … 2545 2549 margin: 0 0 10px; 2546 2550 } 2547 2551 2552 #plugin-information .fyi-description { 2553 margin-top: 0; 2554 } 2555 2548 2556 #plugin-information .counter-container { 2549 2557 margin: 3px 0; 2550 2558 } -
src/wp-admin/includes/plugin-install.php
537 537 538 538 echo "</div>\n"; 539 539 540 $date_format = __( 'M j, Y @ H:i' );541 542 540 if ( ! empty( $api->last_updated ) ) { 543 541 $last_updated_timestamp = strtotime( $api->last_updated ); 542 543 /* translators: 1: plugin last update date, 2: plugin last update time */ 544 $last_updated_extended = sprintf( __( 'on %1$s at %2$s' ), 545 /* translators: plugin last update date format. See http://php.net/date */ 546 date_i18n( __( 'M j, Y' ), $last_updated_timestamp ), 547 /* translators: plugin last update time format. See http://php.net/date */ 548 date_i18n( __( 'H:i' ), $last_updated_timestamp ) 549 ); 544 550 } 545 551 546 552 ?> … … 552 558 <?php } if ( ! empty( $api->author ) ) { ?> 553 559 <li><strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?></li> 554 560 <?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 ) ); ?>">561 <li><strong><?php _e( 'Last Updated:' ); ?></strong> 556 562 <?php printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp ) ); ?> 557 </span></li> 563 <span class="last-updated-extended"><?php echo esc_html( $last_updated_extended ); ?></span> 564 </li> 558 565 <?php } if ( ! empty( $api->requires ) ) { ?> 559 566 <li><strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?></li> 560 567 <?php } if ( ! empty( $api->tested ) ) { ?> … … 578 585 <?php if ( ! empty( $api->rating ) ) { ?> 579 586 <h3><?php _e( 'Average Rating' ); ?></h3> 580 587 <?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>588 <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 589 <?php } 583 590 584 if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { 591 if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { ?> 592 <h3><?php _e( 'Reviews' ); ?></h3> 593 <p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p> 594 <?php 585 595 foreach ( $api->ratings as $key => $ratecount ) { 586 596 // Avoid div-by-zero. 587 597 $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0; 598 /* translators: 1: number of stars, 2: number of reviews */ 599 $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 ), 600 $key, 601 number_format_i18n( $ratecount ) 602 ) ); 588 603 ?> 589 604 <div class="counter-container"> 590 605 <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> 606 target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span> 593 607 <span class="counter-back"> 594 608 <span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span> 595 609 </span> 596 <span class="counter-count" ><?php echo number_format_i18n( $ratecount ); ?></span>610 <span class="counter-count" aria-hidden="true"><?php echo number_format_i18n( $ratecount ); ?></span> 597 611 </div> 598 612 <?php 599 613 }