highlight = $theId; Typecho_Cookie::set('__typecho_notice_highlight', $theId, $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); } /** * 获取高亮的id * * @access public * @return integer */ public function getHighlightId() { return preg_match("/[0-9]+/", $this->highlight, $matches) ? $matches[0] : 0; } /** * 设定堆栈每一行的值 * * @param string $value 值对应的键值 * @param string $type 提示类型 * @param string $typeFix 兼容老插件 * @return array */ public function set($value, $type = 'notice', $typeFix = 'notice') { $notice = is_array($value) ? array_values($value) : array($value); if (empty($type) && $typeFix) { $type = $typeFix; } Typecho_Cookie::set('__typecho_notice', Json::encode($notice), $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); Typecho_Cookie::set('__typecho_notice_type', $type, $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); } }