WordPress.org

Make WordPress Core

Changeset 16298


Ignore:
Timestamp:
11/11/2010 03:16:16 PM (8 years ago)
Author:
ryan
Message:

Add screen options to site-themes. Props PeteMall. see #14897

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-themes-list-table.php

    r16242 r16298  
    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' );
     
    113116            uasort( $this->items, array( &$this, '_order_callback' ) );
    114117        }
    115 
    116         $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
    117118
    118119        $start = ( $page - 1 ) * $themes_per_page;
  • trunk/wp-admin/includes/misc.php

    r16194 r16298  
    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 )
  • trunk/wp-admin/network/site-themes.php

    r16272 r16298  
    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';
     
    9295
    9396require('../admin-header.php');
    94 
    95 add_thickbox();
    96 
    97 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' ), 'default' => 999) );
    9897
    9998require_once(ABSPATH . 'wp-admin/admin-header.php');
Note: See TracChangeset for help on using the changeset viewer.