diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 7bde60c517..f24c68025b 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2196,7 +2196,6 @@ function comment_form( $args = array(), $post_id = null ) { $req = get_option( 'require_name_email' ); $html_req = ( $req ? " required='required'" : '' ); $html5 = 'html5' === $args['format']; - $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; $fields = array( 'author' => '
', @@ -2204,11 +2203,15 @@ function comment_form( $args = array(), $post_id = null ) { '', 'url' => '' . '
', - 'cookies' => ' ', ); - $required_text = sprintf( ' ' . __('Required fields are marked %s'), '*' ); + if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) ) { + $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; + $fields['cookies'] = ' '; + } + + $required_text = sprintf( ' ' . __( 'Required fields are marked %s' ), '*' ); /** * Filters the default comment form fields. diff --git a/wp-includes/version.php b/wp-includes/version.php index 4fb03b6d96..ff0bd58197 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.8-alpha-43448'; +$wp_version = '4.9.8-alpha-43449'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.