public function __construct($name, $renderFn, $store) { $this->name = $name; $this->renderFn = $renderFn; $this->store = $store; //get the requested value for the filters if ($this->value === null) { $this->value = CocoRequest::request($this->name); } }
public static function restore() { $stored = get_option('cocostore_values'); if (!$stored) { $stored = serialize(array()); } CocoRequest::$restored = array_merge(unserialize($stored), $_POST); update_option('cocostore_values', serialize(array())); //clears the cache }