Changeset 31990
- Timestamp:
- 04/02/2015 11:48:26 PM (10 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r31982 r31990 106 106 'page' => $paged, 107 107 'per_page' => $per_page, 108 'fields' => array( 'last_updated' => true, 'downloaded' => true, 'icons' => true ), 108 'fields' => array( 109 'last_updated' => true, 110 'icons' => true, 111 'active_installs' => true 112 ), 109 113 // Send the locale and installed plugin slugs to the API so it can provide context-sensitive results. 110 114 'locale' => get_locale(), … … 479 483 </div> 480 484 <div class="column-downloaded"> 481 <?php echo sprintf( _n( '%s download', '%s downloads', $plugin['downloaded'] ), number_format_i18n( $plugin['downloaded'] ) ); ?> 485 <?php 486 if ( $plugin['active_installs'] >= 1000000 ) { 487 $active_installs_text = _x( '1+ Million', 'Active plugin installs' ); 488 } else { 489 $active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+'; 490 } 491 printf( __( '%s Active Installs' ), $active_installs_text ); 492 ?> 482 493 </div> 483 494 <div class="column-compatibility"> -
trunk/src/wp-admin/includes/plugin-install.php
r31862 r31990 349 349 'slug' => wp_unslash( $_REQUEST['plugin'] ), 350 350 'is_ssl' => is_ssl(), 351 'fields' => array( 'banners' => true, 'reviews' => true ) 351 'fields' => array( 352 'banners' => true, 353 'reviews' => true, 354 'downloaded' => false, 355 'active_installs' => true 356 ) 352 357 ) ); 353 358 … … 459 464 <?php } if ( ! empty( $api->tested ) ) { ?> 460 465 <li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li> 461 <?php } if ( ! empty( $api->downloaded ) ) { ?> 462 <li><strong><?php _e( 'Downloaded:' ); ?></strong> <?php printf( _n( '%s time', '%s times', $api->downloaded ), number_format_i18n( $api->downloaded ) ); ?></li> 466 <?php } if ( ! empty( $api->active_installs ) ) { ?> 467 <li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php 468 if ( $api->active_installs >= 1000000 ) { 469 _ex( '1+ Million', 'Active plugin installs' ); 470 } else { 471 echo number_format_i18n( $api->active_installs ) . '+'; 472 } 473 ?></li> 463 474 <?php } if ( ! empty( $api->slug ) && empty( $api->external ) ) { ?> 464 475 <li><a target="_blank" href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page »' ); ?></a></li>
Note: See TracChangeset
for help on using the changeset viewer.