_notices)){ throw new Validate('Try to get undefined option'); } $data = get_option(self::AMOFORMS_PREFIX.$notice_name, array()); if (!in_array($data, $this->_statuses)){ $showtime = ((int)$data <= time()) || empty($data); } return ($data != 'hide') && $showtime; } /** * @since 2.19.0 * @param $notice_name * @param $status * @return bool * @throws Validate */ public function set_notice_status($notice_name, $status){ if(!in_array($notice_name, $this->_notices)){ throw new Validate('Try to set undefined option'); } if($status == 'time'){ $status = strtotime("+" . self::AMOFORMS_SHOW_TIMEOUT . " day"); } return (bool)update_option(self::AMOFORMS_PREFIX.$notice_name, $status); } }