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

Props ovann86.
Fixes #37509.


git-svn-id: https://develop.svn.wordpress.org/trunk@38729 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-10-05 03:32:41 +00:00
parent 3586523daf
commit 1bd6d19f80
2 changed files with 5 additions and 1 deletions

View File

@ -562,6 +562,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
<?php
if ( $plugin['active_installs'] >= 1000000 ) {
$active_installs_text = _x( '1+ Million', 'Active plugin installs' );
} elseif ( 0 == $plugin['active_installs'] ) {
$active_installs_text = _x( 'Less Than 10', 'Active plugin installs' );
} else {
$active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+';
}

View File

@ -556,10 +556,12 @@ function install_plugin_information() {
</li>
<?php } if ( ! empty( $api->tested ) ) { ?>
<li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li>
<?php } if ( ! empty( $api->active_installs ) ) { ?>
<?php } if ( isset( $api->active_installs ) ) { ?>
<li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php
if ( $api->active_installs >= 1000000 ) {
_ex( '1+ Million', 'Active plugin installs' );
} elseif ( 0 == $api->active_installs ) {
_ex( 'Less Than 10', 'Active plugin installs' );
} else {
echo number_format_i18n( $api->active_installs ) . '+';
}