}elseif(preg_match('/MSIE\s7/i', $_SERVER['HTTP_USER_AGENT'])){
//对于使用ie7的用户减少推送 (cookies 3天失效)
setcookie('alert_ie_visitor_'.COOKIEHASH,'ie7',time()+(60*60*24*3),COOKIEPATH,COOKIE_DOMAIN);
}elseif(preg_match('/MSIE\s8/i', $_SERVER['HTTP_USER_AGENT'])){
//对于使用ie8的用尽量不要推送 (cookies 100天失效)
setcookie('alert_ie_visitor_'.COOKIEHASH,'ie8',time()+(60*60*24*10),COOKIEPATH,COOKIE_DOMAIN);
}
}
add_action('init', 'setcookie_for_ie');