Skip to content

Commit 385542e

Browse files
committed
Password field example and small fix.
1 parent 97d7e52 commit 385542e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ReduxCore/inc/fields/password/field_password.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private function _render_combined_field() {
6969
}
7070

7171
// Username field
72-
echo '<input type="input" autocomplete="off" placeholder="' . $this->value['placeholder']['username'] . '" id="' . $this->field['id'] . '[username]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][username]" value="' . esc_attr( $this->value['username'] ) . '" class="regular-text ' . $this->field['class'] . '" style="margin-right: 5px;" />';
72+
echo '<input type="input" autocomplete="off" placeholder="' . $this->value['placeholder']['username'] . '" id="' . $this->field['id'] . '[username]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][username]" value="' . esc_attr( $this->value['username'] ) . '" class="regular-text ' . $this->field['class'] . '" />&nbsp;';
7373

7474
// Password field
7575
echo '<input type="password" autocomplete="off" placeholder="' . $this->value['placeholder']['password'] . '" id="' . $this->field['id'] . '[password]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][password]" value="' . esc_attr( $this->value['password'] ) . '" class="regular-text ' . $this->field['class'] . '" />';

sample/sample-config.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,13 @@
532532
'subtitle' => __('You can use the following shortcodes in your footer text: [wp-url] [site-url] [theme-url] [login-url] [logout-url] [site-title] [site-tagline] [current-year]', 'redux-framework-demo'),
533533
'default' => 'Powered by [wp-url]. Built on the [theme-url].',
534534
),
535-
535+
array(
536+
'id' => 'password',
537+
'type' => 'password',
538+
'username' => true,
539+
'title' => 'SMTP Account',
540+
//'placeholder' => array('username' => 'Enter your Username')
541+
)
536542
)
537543
);
538544

0 commit comments

Comments
 (0)