Select Git revision
database.go
class-wp-ms-themes-list-table.php 19.76 KiB
<?php
/**
* List Table API: WP_MS_Themes_List_Table class
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/**
* Core class used to implement displaying themes in a list table for the network admin.
*
* @since 3.1.0
* @access private
*
* @see WP_List_Table
*/
class WP_MS_Themes_List_Table extends WP_List_Table {
public $site_id;
public $is_site_themes;
private $has_items;
/**
* Constructor.
*
* @since 3.1.0
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
* @global string $status
* @global int $page
*
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
global $status, $page;
parent::__construct( array(
'plural' => 'themes',
'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
) );
$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all';
if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) )
$status = 'all';
$page = $this->get_pagenum();
$this->is_site_themes = ( 'site-themes-network' === $this->screen->id ) ? true : false;
if ( $this->is_site_themes )
$this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
}
/**
*
* @return array
*/
protected function get_table_classes() {
// todo: remove and add CSS for .themes
return array( 'widefat', 'plugins' );
}
/**
*
* @return bool
*/
public function ajax_user_can() {