WordPress.org

Make WordPress Core

Changeset 38729


Ignore:
Timestamp:
10/05/2016 03:32:41 AM (4 years ago)
Author:
dd32
Message:

Plugins: Display 'Less Than 10' active installs of a plugin rather than '0+' active installs.

Props ovann86.
Fixes #37509.

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

    r38705 r38729  
    563563                    if ( $plugin['active_installs'] >= 1000000 ) {
    564564                        $active_installs_text = _x( '1+ Million', 'Active plugin installs' );
     565                    } elseif ( 0 == $plugin['active_installs'] ) {
     566                        $active_installs_text = _x( 'Less Than 10', 'Active plugin installs' );
    565567                    } else {
    566568                        $active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+';
  • trunk/src/wp-admin/includes/plugin-install.php

    r38705 r38729  
    557557            <?php } if ( ! empty( $api->tested ) ) { ?>
    558558                <li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li>
    559             <?php } if ( ! empty( $api->active_installs ) ) { ?>
     559            <?php } if ( isset( $api->active_installs ) ) { ?>
    560560                <li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php
    561561                    if ( $api->active_installs >= 1000000 ) {
    562562                        _ex( '1+ Million', 'Active plugin installs' );
     563                    } elseif ( 0 == $api->active_installs ) {
     564                        _ex( 'Less Than 10', 'Active plugin installs' );
    563565                    } else {
    564566                        echo number_format_i18n( $api->active_installs ) . '+';
Note: See TracChangeset for help on using the changeset viewer.