Make WordPress Core


Ignore:
Timestamp:
04/02/2015 11:48:26 PM (11 years ago)
Author:
dd32
Message:

Plugins Browser: Replace the download count with the number of Active installs of the plugin.
Fixes #31865

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r31982 r31990  
    106106                        'page' => $paged,
    107107                        '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                        ),
    109113                        // Send the locale and installed plugin slugs to the API so it can provide context-sensitive results.
    110114                        'locale' => get_locale(),
     
    479483                                </div>
    480484                                <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                                        ?>
    482493                                </div>
    483494                                <div class="column-compatibility">
Note: See TracChangeset for help on using the changeset viewer.