Ticket #22599: 22599-css.diff
File 22599-css.diff, 2.8 KB (added by , 11 years ago) |
---|
-
wp-admin/css/common.css
1928 1928 margin: 0 0 10px; 1929 1929 } 1930 1930 1931 #plugin-information .counter-label { 1932 float: left; 1933 margin-right: 5px; 1934 } 1935 1936 #plugin-information .counter-back { 1937 height: 17px; 1938 width: 92px; 1939 background-color: #ececec; 1940 float: left; 1941 } 1942 1943 #plugin-information .counter-bar { 1944 height: 17px; 1945 background-color: #fddb5a; 1946 float: left; 1947 } 1948 1949 #plugin-information .counter-count { 1950 margin-left: 5px; 1951 } 1952 1931 1953 #plugin-information-footer { 1932 1954 padding: 15px 16px; 1933 1955 position: absolute; -
wp-admin/includes/plugin-install.php
311 311 function install_plugin_information() { 312 312 global $tab; 313 313 314 $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl() ) );314 $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl(), 'fields' => array( 'reviews' => true ) ) ); 315 315 316 316 if ( is_wp_error( $api ) ) 317 317 wp_die( $api ); … … 331 331 'faq' => _x('FAQ', 'Plugin installer section title'), 332 332 'screenshots' => _x('Screenshots', 'Plugin installer section title'), 333 333 'changelog' => _x('Changelog', 'Plugin installer section title'), 334 'reviews' => _x('Reviews', 'Plugin installer section title'), 334 335 'other_notes' => _x('Other Notes', 'Plugin installer section title') 335 336 ); 336 337 … … 401 402 <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> 402 403 <small><?php printf( _n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings) ); ?></small> 403 404 <?php endif; ?> 405 406 <?php 407 if ( ! empty( $api->ratings ) ) { 408 foreach( $api->ratings as $key=>$ratecount ) { 409 // avoid div-by-zero 410 $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0; 411 ?> 412 <div class="counter-container"> 413 <a href="//wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>" 414 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 ) ); ?>"> 415 <span class="counter-label"><?php echo $key; ?> stars</span> 416 <span class="counter-back"> 417 <span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span> 418 </span> 419 </a> 420 <span class="counter-count"><?php echo $ratecount; ?></span> 421 </div> 422 <?php 423 } 424 } 425 ?> 404 426 </div> 405 427 <div id="section-holder" class="wrap"> 406 428 <?php