diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
index ca0a8de714..cc1584623e 100644
a
|
b
|
function comment_form_title( $noreplytext = false, $replytext = false, $linktopa |
1977 | 1977 | * @type int $avatar_size Height and width dimensions of the avatar size. Default 32. |
1978 | 1978 | * @type bool $reverse_top_level Ordering of the listed comments. If true, will display newest comments first. |
1979 | 1979 | * @type bool $reverse_children Whether to reverse child comments in the list. Default null. |
1980 | | * @type string $format How to format the comments list. |
1981 | | * Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'. |
1982 | 1980 | * @type bool $short_ping Whether to output short pings. Default false. |
1983 | 1981 | * @type bool $echo Whether to echo the output or return it. Default true. |
1984 | 1982 | * } |
… |
… |
function wp_list_comments( $args = array(), $comments = null ) { |
2004 | 2002 | 'avatar_size' => 32, |
2005 | 2003 | 'reverse_top_level' => null, |
2006 | 2004 | 'reverse_children' => '', |
2007 | | 'format' => current_theme_supports( 'html5', 'comment-list' ) ? 'html5' : 'xhtml', |
2008 | 2005 | 'short_ping' => false, |
2009 | 2006 | 'echo' => true, |
2010 | 2007 | ); |
… |
… |
function wp_list_comments( $args = array(), $comments = null ) { |
2194 | 2191 | * and 200 characters, respectively. |
2195 | 2192 | * @since 4.6.0 Introduced the 'action' argument. |
2196 | 2193 | * @since 4.9.6 Introduced the 'cookies' default comment field. |
| 2194 | * @since 5.3.0 Removed the 'format' argument as HTML5 is now standard. Also removed novalidate form attribute since |
| 2195 | * browsers are now consistent in how they validate. |
2197 | 2196 | * |
2198 | 2197 | * @param array $args { |
2199 | 2198 | * Optional. Default arguments and form fields to override. |
… |
… |
function wp_list_comments( $args = array(), $comments = null ) { |
2235 | 2234 | * @type string $submit_field HTML format for the markup surrounding the Submit button and comment hidden |
2236 | 2235 | * fields. Default: '<p class="form-submit">%1$s %2$s</p>', where %1$s is the |
2237 | 2236 | * submit button markup and %2$s is the comment hidden fields. |
2238 | | * @type string $format The comment form format. Default 'xhtml'. Accepts 'xhtml', 'html5'. |
2239 | 2237 | * } |
2240 | 2238 | * @param int|WP_Post $post_id Post ID or WP_Post object to generate the form for. Default current post. |
2241 | 2239 | */ |
… |
… |
function comment_form( $args = array(), $post_id = null ) { |
2261 | 2259 | $user_identity = $user->exists() ? $user->display_name : ''; |
2262 | 2260 | |
2263 | 2261 | $args = wp_parse_args( $args ); |
2264 | | if ( ! isset( $args['format'] ) ) { |
2265 | | $args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml'; |
2266 | | } |
2267 | 2262 | |
2268 | 2263 | $req = get_option( 'require_name_email' ); |
2269 | 2264 | $html_req = ( $req ? " required='required'" : '' ); |
2270 | | $html5 = 'html5' === $args['format']; |
2271 | 2265 | $fields = array( |
2272 | 2266 | 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
2273 | 2267 | '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $html_req . ' /></p>', |
2274 | 2268 | 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
2275 | | '<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $html_req . ' /></p>', |
| 2269 | '<input id="email" name="email" type="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $html_req . ' /></p>', |
2276 | 2270 | 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' . |
2277 | | '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>', |
| 2271 | '<input id="url" name="url" type="url" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>', |
2278 | 2272 | ); |
2279 | 2273 | |
2280 | 2274 | if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) { |
… |
… |
function comment_form( $args = array(), $post_id = null ) { |
2383 | 2377 | do_action( 'comment_form_must_log_in_after' ); |
2384 | 2378 | else : |
2385 | 2379 | ?> |
2386 | | <form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>> |
| 2380 | <form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"> |
2387 | 2381 | <?php |
2388 | 2382 | /** |
2389 | 2383 | * Fires at the top of the comment form, inside the form tag. |