WordPress.org

Make WordPress Core

Changeset 42829


Ignore:
Timestamp:
03/12/2018 01:56:20 AM (4 years ago)
Author:
dd32
Message:

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.

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

    r42827 r42829  
    651651                    <?php
    652652                    if ( $plugin['active_installs'] >= 1000000 ) {
    653                         $active_installs_text = _x( '1+ Million', 'Active plugin installations' );
     653                        $active_installs_millions = floor( $plugin['active_installs'] / 1000000 );
     654                        $active_installs_text = sprintf(
     655                            _nx( '%s+ Million', '%s+ Million', 'Active plugin installations', $active_installs_millions ),
     656                            number_format_i18n( $active_installs_millions )
     657                        );
    654658                    } elseif ( 0 == $plugin['active_installs'] ) {
    655659                        $active_installs_text = _x( 'Less Than 10', 'Active plugin installations' );
  • trunk/src/wp-admin/includes/plugin-install.php

    r42686 r42829  
    653653                                        <?php
    654654                                        if ( $api->active_installs >= 1000000 ) {
    655                                             _ex( '1+ Million', 'Active plugin installations' );
     655                                            $active_installs_millions = floor( $api->active_installs / 1000000 );
     656                                            printf(
     657                                                _nx( '%s+ Million', '%s+ Million', 'Active plugin installations', $active_installs_millions ),
     658                                                number_format_i18n( $active_installs_millions )
     659                                            );
    656660                                        } elseif ( 0 == $api->active_installs ) {
    657661                                            _ex( 'Less Than 10', 'Active plugin installations' );
Note: See TracChangeset for help on using the changeset viewer.