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

git-svn-id: http://core.svn.wordpress.org/trunk@22123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-10-05 16:34:32 +00:00
parent b8f1b7902f
commit 3854fe2e0f
3 changed files with 2 additions and 9 deletions

View File

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

View File

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

View File

@ -1521,9 +1521,9 @@ function comment_form( $args = array(), $post_id = null ) {
$req = get_option( 'require_name_email' ); $req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' ); $aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array( $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>', '<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>', '<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>' . '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>', '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',