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

Props ovann86.
Fixes #37509.

Built from https://develop.svn.wordpress.org/trunk@38729


git-svn-id: http://core.svn.wordpress.org/trunk@38672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-10-05 03:33:29 +00:00
parent d317fa487f
commit b83a62217e
3 changed files with 6 additions and 2 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 ) . '+';
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38727';
$wp_version = '4.7-alpha-38729';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.