Ticket #29274: 29274.diff
| File 29274.diff, 1.9 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/plugin-install.php
324 324 $api = plugins_api( 'plugin_information', array( 325 325 'slug' => wp_unslash( $_REQUEST['plugin'] ), 326 326 'is_ssl' => is_ssl(), 327 'fields' => array( 'banners' => true, 'reviews' => true )327 'fields' => array( 'banners' => true, 'reviews' => true, 'contributors' => true ) 328 328 ) ); 329 329 330 330 if ( is_wp_error( $api ) ) { … … 470 470 <h3><?php _e( 'Contributors' ); ?></h3> 471 471 <ul class="contributors"> 472 472 <?php 473 foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) { 474 if ( empty( $contrib_username ) && empty( $contrib_profile ) ) { 475 continue; 473 foreach ( (array) $api->contributors as $contrib_username => $contrib ) { 474 $contrib_username = sanitize_user( $contrib_username ); 475 echo '<li>'; 476 if ( $contrib['profile'] ) { 477 echo '<a href="' . esc_url( $contrib['profile'] ) . '" target="_blank">'; 476 478 } 477 if ( empty( $contrib_username ) ) { 478 $contrib_username = preg_replace( '/^.+\/(.+)\/?$/', '\1', $contrib_profile ); 479 echo "<img src='" . esc_url( $contrib['avatar'] . '&s=36' ) . "' width='18' height='18' />{$contrib_username}"; 480 if ( $contrib['profile'] ) { 481 echo '</a>'; 479 482 } 480 $contrib_username = sanitize_user( $contrib_username ); 481 if ( empty( $contrib_profile ) ) { 482 echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</li>"; 483 } else { 484 echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</a></li>"; 485 } 483 echo '</li>'; 486 484 } 487 485 ?> 488 486 </ul>