Plugins: Add support for plugins having an `active_installs` value larger than 1 million.

WordPress.org currently supports up to 5 million, and with the growth of WordPress, it's expected that that upper bound will increase in the future.

Fixes #43193.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2018-03-12 01:57:31 +00:00
parent 81500e50ef
commit 42b03122b5
3 changed files with 11 additions and 3 deletions

View File

@ -650,7 +650,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
<div class="column-downloaded">
<?php
if ( $plugin['active_installs'] >= 1000000 ) {
$active_installs_text = _x( '1+ Million', 'Active plugin installations' );
$active_installs_millions = floor( $plugin['active_installs'] / 1000000 );
$active_installs_text = sprintf(
_nx( '%s+ Million', '%s+ Million', 'Active plugin installations', $active_installs_millions ),
number_format_i18n( $active_installs_millions )
);
} elseif ( 0 == $plugin['active_installs'] ) {
$active_installs_text = _x( 'Less Than 10', 'Active plugin installations' );
} else {

View File

@ -652,7 +652,11 @@ function install_plugin_information() {
<li><strong><?php _e( 'Active Installations:' ); ?></strong>
<?php
if ( $api->active_installs >= 1000000 ) {
_ex( '1+ Million', 'Active plugin installations' );
$active_installs_millions = floor( $api->active_installs / 1000000 );
printf(
_nx( '%s+ Million', '%s+ Million', 'Active plugin installations', $active_installs_millions ),
number_format_i18n( $active_installs_millions )
);
} elseif ( 0 == $api->active_installs ) {
_ex( 'Less Than 10', 'Active plugin installations' );
} else {

View File

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