Skip to content

Commit 9994bdc

Browse files
committed
Add inline styles to wp_login_form
1 parent 4ac9d7d commit 9994bdc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/wp-includes/general-template.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,8 @@ function wp_login_form( $args = array() ) {
576576
*/
577577
$login_form_bottom = apply_filters( 'login_form_bottom', '', $args );
578578

579+
$direction_style = is_rtl() ? 'style="direction: ltr;" ' : '';
580+
579581
$form =
580582
sprintf(
581583
'<form name="%1$s" id="%1$s" action="%2$s" method="post">',
@@ -586,19 +588,21 @@ function wp_login_form( $args = array() ) {
586588
sprintf(
587589
'<p class="login-username">
588590
<label for="%1$s">%2$s</label>
589-
<input type="text" name="log" id="%1$s" autocomplete="username" class="input" value="%3$s" size="20" />
591+
<input type="text" name="log" id="%1$s" autocomplete="username" class="input" value="%3$s" size="20" %4$s/>
590592
</p>',
591593
esc_attr( $args['id_username'] ),
592594
esc_html( $args['label_username'] ),
593-
esc_attr( $args['value_username'] )
595+
esc_attr( $args['value_username'] ),
596+
$direction_style
594597
) .
595598
sprintf(
596599
'<p class="login-password">
597600
<label for="%1$s">%2$s</label>
598-
<input type="password" name="pwd" id="%1$s" autocomplete="current-password" class="input" value="" size="20" />
601+
<input type="password" name="pwd" id="%1$s" autocomplete="current-password" class="input" value="" size="20" %3$s/>
599602
</p>',
600603
esc_attr( $args['id_password'] ),
601-
esc_html( $args['label_password'] )
604+
esc_html( $args['label_password'] ),
605+
$direction_style
602606
) .
603607
$login_form_middle .
604608
( $args['remember'] ?

0 commit comments

Comments
 (0)