Ticket #16612: comment_cookies_nocache.diff
| File comment_cookies_nocache.diff, 1.2 KB (added by , 15 years ago) |
|---|
-
public/wp-includes/class-wp.php
314 314 $status = null; 315 315 $exit_required = false; 316 316 317 if ( is_user_logged_in() )317 if ( is_user_logged_in() || are_comment_cookies_set() ) 318 318 $headers = array_merge($headers, wp_get_nocache_headers()); 319 319 if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) { 320 320 $status = 404; -
public/wp-includes/comment.php
1995 1995 return $open; 1996 1996 } 1997 1997 1998 ?> 1998 /** 1999 * Check to see if any of the comment author cache cookies are set for this request 2000 * 2001 * @return bool Whether or not they are. 2002 */ 2003 function are_comment_cookies_set() { 2004 if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) || isset($_COOKIE['comment_author_email_'.COOKIEHASH]) || isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) { 2005 return true; 2006 } 2007 2008 return false; 2009 } 2010 2011 ?> 2012 No newline at end of file