Make WordPress Core

Ticket #15269: 15269.4.patch

File 15269.4.patch, 4.5 KB (added by ocean90, 14 years ago)

Here we go.

  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    99class WP_MS_Themes_List_Table extends WP_List_Table {
    1010
    1111        function WP_MS_Themes_List_Table() {
    12                 global $status, $page;
     12                global $status, $page, $current_screen;
    1313
    1414                $default_status = get_user_option( 'themes_last_view' );
    1515                if ( empty( $default_status ) )
     
    2323                $page = $this->get_pagenum();
    2424
    2525                parent::WP_List_Table( array(
    26                         'screen' => 'themes',
     26                        'screen' => $current_screen,
    2727                        'plural' => 'plugins', // @todo replace with themes and add css
    2828                ) );
    2929        }
     
    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                        // Network admin
     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/includes/class-wp-plugins-list-table.php

     
    99class WP_Plugins_List_Table extends WP_List_Table {
    1010
    1111        function WP_Plugins_List_Table() {
    12                 global $status, $page;
     12                global $status, $page, $current_screen;
    1313
    1414                $default_status = get_user_option( 'plugins_last_view' );
    1515                if ( empty( $default_status ) )
     
    2323                $page = $this->get_pagenum();
    2424
    2525                parent::WP_List_Table( array(
    26                         'screen' => 'plugins',
     26                        'screen' => $current_screen,
    2727                        'plural' => 'plugins',
    2828                ) );
    2929        }
     
    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/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>' .