# Password
The Password field, which can be used as a login with password, could be used as a POP or SMTP login for other site functions.
Table of Contents
# Arguments
Name | Type | Default | Description |
---|---|---|---|
type | string | password | Value identifying the field type. |
default | array | See Default Argument below. | |
placeholder | string |
| Default placeholder values. |
username | bool | true | Enable/Disable the username field along side the password field. |
Also See
# Default Argument
Name | Type | Description |
---|---|---|
username | string | Default text to appear in the username field. |
password | string | Default text to appear in the password field. |
# Placeholder Options
Name | Type | Description |
---|---|---|
username | string | Placeholder text for the username field. |
password | string | Placeholder text for the password field. |
# Build Config
Build a Custom Configuration →
Changes you make to this form will be reflected in the generated code.
Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
'type' => 'password'
) );
# Example Config
Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
'id' => 'opt-password',
'type' => 'password',
'username' => true,
'title' => esc_html__( 'SMTP Account', 'your-textdomain-here' ),
'placeholder' => array(
'username' => esc_html__( 'Enter your Username', 'your-textdomain-here' ),
'password' => esc_html__( 'Enter your Password', 'your-textdomain-here' ),
)
) );
# Example Usage
This example is based on the example usage provided above. Be sure to change $redux_demo
to the value you specified in your opt_name argument.
global $redux_demo;
echo 'Username value:' . $redux_demo['opt-password']['username'];
echo 'Password value:' . $redux_demo['opt-password']['password'];
← Palette Color Radio →