`add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form' ) );'
props obenland. see #23850. git-svn-id: http://core.svn.wordpress.org/trunk@24417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
17acd37457
commit
5969819038
|
@ -1506,7 +1506,7 @@ function wp_list_comments($args = array(), $comments = null ) {
|
|||
'avatar_size' => 32,
|
||||
'reverse_top_level' => null,
|
||||
'reverse_children' => '',
|
||||
'format' => 'xhtml', // or html5
|
||||
'format' => current_theme_supports( 'html5', 'comment-list' ) ? 'html5' : 'xhtml',
|
||||
'short_ping' => false,
|
||||
);
|
||||
|
||||
|
@ -1606,9 +1606,12 @@ function comment_form( $args = array(), $post_id = null ) {
|
|||
$user = wp_get_current_user();
|
||||
$user_identity = $user->exists() ? $user->display_name : '';
|
||||
|
||||
if ( ! isset( $args['format'] ) )
|
||||
$args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml';
|
||||
|
||||
$req = get_option( 'require_name_email' );
|
||||
$aria_req = ( $req ? " aria-required='true'" : '' );
|
||||
$html5 = isset( $args['format'] ) && 'html5' === $args['format'];
|
||||
$html5 = 'html5' === $args['format'];
|
||||
$fields = array(
|
||||
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
|
||||
|
|
|
@ -155,7 +155,7 @@ function get_template_part( $slug, $name = null ) {
|
|||
function get_search_form( $echo = true ) {
|
||||
do_action( 'pre_get_search_form' );
|
||||
|
||||
$format = ( current_theme_supports( 'html5-search-form' ) ) ? 'html5' : 'xhtml';
|
||||
$format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
|
||||
$format = apply_filters( 'search_form_format', $format );
|
||||
|
||||
$search_form_template = locate_template( 'searchform.php' );
|
||||
|
|
Loading…
Reference in New Issue