/**
  * GmediaProcessor_Library constructor.
  */
 public function __construct()
 {
     parent::__construct();
     global $user_ID;
     self::$cookie_key = "gmedia_library:wpmedia";
     $this->selected_items = parent::selected_items(self::$cookie_key);
 }
 /**
  * GmediaProcessor_Library constructor.
  */
 public function __construct()
 {
     parent::__construct();
     global $gmCore;
     $user_ID = get_current_user_id();
     self::$cookie_key = "gmedia_library";
     $this->mode = $gmCore->_get('mode', false);
     $stack = 'show' == $gmCore->_get('stack') ? 'show' : false;
     $filter = 'selected' == $gmCore->_get('filter') ? 'selected' : false;
     if ($this->edit_term) {
         self::$cookie_key .= ':term' . $this->edit_term;
         if ($this->edit_term && !isset($_COOKIE[self::$cookie_key])) {
             foreach ($_COOKIE as $key => $value) {
                 if ('gmedia_library:' === substr($key, 0, 15)) {
                     setcookie($key, '', time() - 3600);
                     unset($_COOKIE[$key]);
                 }
             }
         }
     } elseif ($this->gmediablank && 'select_multiple' == $this->mode) {
         self::$cookie_key .= ':frame';
     }
     $this->url = add_query_arg(array('mode' => $this->mode, 'stack' => $stack, 'filter' => $filter, 'edit_term' => $this->edit_term), $this->url);
     $this->selected_items = parent::selected_items(self::$cookie_key);
     $this->stack_items = parent::selected_items("gmedia_{$user_ID}_libstack", 'stack_items');
     add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
 }
 /**
  * GmediaProcessor_Library constructor.
  */
 public function __construct()
 {
     global $user_ID;
     $this->taxonomy = 'gmedia_gallery';
     self::$cookie_key = 'gmedia_terms:gallery';
     $this->selected_items = parent::selected_items(self::$cookie_key);
     parent::__construct();
 }
 /**
  * GmediaProcessor_Library constructor.
  */
 public function __construct()
 {
     parent::__construct();
     self::$cookie_key = "gmedia_terms:{$this->taxterm}";
     if (!isset($_COOKIE[self::$cookie_key])) {
         foreach ($_COOKIE as $key => $value) {
             if ('gmedia_terms' === substr($key, 0, 12)) {
                 setcookie($key, '', time() - 3600);
                 unset($_COOKIE[$key]);
             }
         }
     }
     $this->selected_items = parent::selected_items(self::$cookie_key);
 }