Example #1
0
 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);
     }
 }
Example #2
0
 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
 }