Skip to content
Snippets Groups Projects
Select Git revision
  • 182176b101d2392b31f04eec2baa5ae7152e03f3
  • master default protected
  • renovate/github.com-blevesearch-bleve-v2-2.x
  • renovate/golang-1.x
  • sql
  • batch
  • debian
  • search_api
  • 0.2.1e
  • 0.2.1d
  • 0.2.1c
  • 0.2.1b
  • 0.2.1a
  • 0.2.1
14 results

database.go

Blame
  • 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() {