Esempio n. 1
0
 /**
  * Constructor.
  *
  * @since 3.1.0
  * @access public
  *
  * @see WP_List_Table::__construct() for more information on default arguments.
  *
  * @param array $args An associative array of arguments.
  */
 public function __construct($args = array())
 {
     global $status, $page;
     parent::__construct(array('plural' => 'plugins', 'screen' => isset($args['screen']) ? $args['screen'] : null));
     $this->tab = isset($args['tab']) ? $args['tab'] : '';
     $status = 'all';
     if (isset($_REQUEST['plugin_status']) && in_array($_REQUEST['plugin_status'], array('update_disabled', 'update_enabled', 'automatic'))) {
         $status = $_REQUEST['plugin_status'];
     }
     if (isset($_REQUEST['s'])) {
         $_SERVER['REQUEST_URI'] = add_query_arg('s', wp_unslash($_REQUEST['s']));
     }
     $page = $this->get_pagenum();
 }
 /**
  * Constructor.
  *
  * @since 3.1.0
  * @access public
  *
  * @see WP_List_Table::__construct() for more information on default arguments.
  *
  * @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));
     $this->tab = isset($args['tab']) ? $args['tab'] : '';
     $status = isset($_REQUEST['theme_status']) ? $_REQUEST['theme_status'] : 'all';
     if (!in_array($status, array('all', 'update_disabled', 'update_enabled', 'automatic'))) {
         $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;
     }
 }