Make WordPress Core

Ticket #15269: 15269.2.patch

File 15269.2.patch, 3.5 KB (added by ocean90, 14 years ago)
  • wp-admin/includes/class-wp-list-table-plugins.php

     
    4343        }
    4444
    4545        function prepare_items() {
    46                 global $status, $plugins, $totals, $page, $orderby, $order, $s;
     46                global $status, $plugins, $totals, $page, $orderby, $order, $s, $current_screen;
    4747
    4848                wp_reset_vars( array( 'orderby', 'order', 's' ) );
    4949
     
    129129                        uasort( $this->items, array( &$this, '_order_callback' ) );
    130130                }
    131131
    132                 $plugins_per_page = $this->get_items_per_page( 'plugins_per_page', 999 );
     132                $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$current_screen->id}_per_page" ) );
    133133
    134134                $start = ( $page - 1 ) * $plugins_per_page;
    135135
  • wp-admin/includes/class-wp-list-table-ms-themes.php

     
    9696                        uasort( $this->items, array( &$this, '_order_callback' ) );
    9797                }
    9898
    99                 $themes_per_page = $this->get_items_per_page( 'themes_per_page', 999 );
     99                $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
    100100
    101101                $start = ( $page - 1 ) * $themes_per_page;
    102102
  • wp-admin/includes/misc.php

     
    343343
    344344                switch ( $map_option ) {
    345345                        case 'edit_per_page':
    346                         case 'sites_network_per_page':
    347346                        case 'users_per_page':
    348                         case 'users_network_per_page':
    349347                        case 'edit_comments_per_page':
    350348                        case 'upload_per_page':
    351349                        case 'edit_tags_per_page':
    352350                        case 'plugins_per_page':
     351                        // Multisite specific
     352                        case 'sites_network_per_page':
     353                        case 'users_network_per_page':
     354                        case 'plugins_network_per_page':
     355                        case 'themes_network_per_page':
    353356                                $value = (int) $value;
    354357                                if ( $value < 1 || $value > 999 )
    355358                                        return;
  • wp-admin/network/themes.php

     
    6666$wp_list_table->prepare_items();
    6767add_thickbox();
    6868
    69 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' ), 'default' => 999) );
     69add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) );
    7070
    7171add_contextual_help($current_screen,
    7272        '<p>' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '</p>' .
  • wp-admin/plugins.php

     
    296296wp_enqueue_script('plugin-install');
    297297add_thickbox();
    298298
    299 add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' ), 'default' => 999) );
     299add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' )) );
    300300
    301301add_contextual_help($current_screen,
    302302        '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .