Make WordPress Core

Ticket #16612: 16612.diff

File 16612.diff, 1.3 KB (added by thomaswm, 10 years ago)

Refreshed patch

  • wp-includes/class-wp.php

     
    370370                $status = null;
    371371                $exit_required = false;
    372372
    373                 if ( is_user_logged_in() )
     373                if ( is_user_logged_in() || are_comment_cookies_set() )
    374374                        $headers = array_merge($headers, wp_get_nocache_headers());
    375375                if ( ! empty( $this->query_vars['error'] ) ) {
    376376                        $status = (int) $this->query_vars['error'];
  • wp-includes/comment-functions.php

     
    27622762        return get_comment( $comment_id );
    27632763
    27642764}
     2765
     2766/**
     2767 * Checks if any of the comment author cache cookies are present.
     2768 *
     2769 * This function checks if any of the 'comment_author_', 'comment_author_email_' or 'comment_author_url_' cookies are present.
     2770 *
     2771 * @since 4.4.0
     2772 * @return bool True if any of the cookies are present.
     2773 */
     2774function are_comment_cookies_set() {
     2775        return isset( $_COOKIE['comment_author_' . COOKIEHASH] ) || isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) || isset( $_COOKIE['comment_author_url_' . COOKIEHASH] );
     2776       
     2777}
     2778 No newline at end of file