Add screen options to site-themes. Props PeteMall. see #14897
git-svn-id: http://svn.automattic.com/wordpress/trunk@16298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6559aa57a5
commit
0d489ee102
|
@ -60,10 +60,13 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
);
|
||||
|
||||
$site_allowed_themes = get_site_allowed_themes();
|
||||
if ( !$this->is_site_themes )
|
||||
if ( !$this->is_site_themes ) {
|
||||
$allowed_themes = $site_allowed_themes;
|
||||
else
|
||||
$themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
|
||||
} else {
|
||||
$allowed_themes = wpmu_get_blog_allowedthemes( $this->site_id );
|
||||
$themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' );
|
||||
}
|
||||
|
||||
$current = get_site_transient( 'update_themes' );
|
||||
|
||||
|
@ -113,8 +116,6 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
uasort( $this->items, array( &$this, '_order_callback' ) );
|
||||
}
|
||||
|
||||
$themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
|
||||
|
||||
$start = ( $page - 1 ) * $themes_per_page;
|
||||
|
||||
if ( $total_this_page > $themes_per_page )
|
||||
|
|
|
@ -353,6 +353,7 @@ function set_screen_options() {
|
|||
case 'users_network_per_page':
|
||||
case 'plugins_network_per_page':
|
||||
case 'themes_network_per_page':
|
||||
case 'site_themes_network_per_page':
|
||||
$value = (int) $value;
|
||||
if ( $value < 1 || $value > 999 )
|
||||
return;
|
||||
|
|
|
@ -86,16 +86,15 @@ if ( $action ) {
|
|||
exit;
|
||||
}
|
||||
|
||||
add_thickbox();
|
||||
add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) );
|
||||
|
||||
$title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id));
|
||||
$parent_file = 'sites.php';
|
||||
$submenu_file = 'sites.php';
|
||||
|
||||
require('../admin-header.php');
|
||||
|
||||
add_thickbox();
|
||||
|
||||
add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' ), 'default' => 999) );
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/admin-header.php');
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue