Ticket #16612: 16612.3.diff
File 16612.3.diff, 1.3 KB (added by , 8 years ago) |
---|
-
src/wp-includes/class-wp.php
401 401 $status = null; 402 402 $exit_required = false; 403 403 404 if ( is_user_logged_in() )404 if ( is_user_logged_in() || wp_check_comment_cookies() ) 405 405 $headers = array_merge($headers, wp_get_nocache_headers()); 406 406 if ( ! empty( $this->query_vars['error'] ) ) { 407 407 $status = (int) $this->query_vars['error']; -
src/wp-includes/comment.php
523 523 } 524 524 525 525 /** 526 * Determine if any comment author identity cookies are present. 527 * 528 * @since 4.7.0 529 * 530 * @return boolean True if any comment cookies are found, otherwise false. 531 */ 532 function wp_check_comment_cookies() { 533 if ( isset( $_COOKIE[ 'comment_author_' . COOKIEHASH ] ) || isset( $_COOKIE[ 'comment_author_email_' . COOKIEHASH ] ) || isset( $_COOKIE[ 'comment_author_url_' . COOKIEHASH ] ) ) { 534 return true; 535 } 536 537 return false; 538 } 539 540 /** 526 541 * Sanitizes the cookies sent to the user already. 527 542 * 528 543 * Will only do anything if the cookies have already been created for the user.