WordPress.org

Make WordPress Core

Ticket #14897: 14897.16.diff

File 14897.16.diff, 2.2 KB (added by PeteMall, 9 years ago)

Add screen options to site-themes.

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

     
    6060                );
    6161
    6262                $site_allowed_themes = get_site_allowed_themes();
    63                 if ( !$this->is_site_themes )
    64                         $allowed_themes = $site_allowed_themes;
    65                 else
     63                if ( !$this->is_site_themes ) {
     64                        $allowed_themes = $site_allowed_themes;
     65                        $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
     66                } else {
    6667                        $allowed_themes = wpmu_get_blog_allowedthemes( $this->site_id );
     68                        $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' );
     69                }
    6770               
    6871                $current = get_site_transient( 'update_themes' );
    6972
     
    113116                        uasort( $this->items, array( &$this, '_order_callback' ) );
    114117                }
    115118
    116                 $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
    117 
    118119                $start = ( $page - 1 ) * $themes_per_page;
    119120
    120121                if ( $total_this_page > $themes_per_page )
  • wp-admin/includes/misc.php

     
    353353                        case 'users_network_per_page':
    354354                        case 'plugins_network_per_page':
    355355                        case 'themes_network_per_page':
     356                        case 'site_themes_network_per_page':
    356357                                $value = (int) $value;
    357358                                if ( $value < 1 || $value > 999 )
    358359                                        return;
  • wp-admin/network/site-themes.php

     
    8686        exit;   
    8787}
    8888
     89add_thickbox();
     90add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) );
     91
    8992$title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id));
    9093$parent_file = 'sites.php';
    9194$submenu_file = 'sites.php';
    9295
    9396require('../admin-header.php');
    9497
    95 add_thickbox();
    96 
    97 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' ), 'default' => 999) );
    98 
    9998require_once(ABSPATH . 'wp-admin/admin-header.php');
    10099?>
    101100