Put required field indicators within labels. Update styling of bundled themes to accommodate. Props MikeHansenMe. fixes #21897

git-svn-id: https://develop.svn.wordpress.org/trunk@22123 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-10-05 16:34:32 +00:00
parent aa177e46ae
commit b0cae159ea
3 changed files with 2 additions and 9 deletions

View File

@ -2123,7 +2123,6 @@ a.comment-reply-link > span {
font-weight: bold;
left: 75%;
position: absolute;
top: 45px;
z-index: 1;
}
#respond .comment-notes,

View File

@ -1237,12 +1237,6 @@ a.comment-reply-link:hover {
.required {
color: red;
}
label ~ span.required {
display: block;
float: left;
margin: -18px 0 0 -16px;
margin: -1.285714286rem 0 0 -1.142857143rem;
}
/* =Front page template

View File

@ -1521,9 +1521,9 @@ function comment_form( $args = array(), $post_id = null ) {
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array(
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
'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>',
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' .
'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',