login_customize.php
4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $post_id;
$use_custom_settings = ! isset( $post_id ) ? false : get_post_meta( $post_id, '_um_login_use_custom_settings', true );
$login_secondary_btn = ! isset( $post_id ) ? UM()->options()->get( 'login_secondary_btn' ) : get_post_meta( $post_id, '_um_login_secondary_btn', true );
$login_forgot_pass_link = ! isset( $post_id ) ? UM()->options()->get( 'login_forgot_pass_link' ) : get_post_meta( $post_id, '_um_login_forgot_pass_link', true );
$login_show_rememberme = ! isset( $post_id ) ? UM()->options()->get( 'login_show_rememberme' ) : get_post_meta( $post_id, '_um_login_show_rememberme', true );
?>
<div class="um-admin-metabox">
<?php
UM()->admin_forms(
array(
'class' => 'um-form-login-customize um-top-label',
'prefix_id' => 'form',
'fields' => array(
array(
'id' => '_um_login_use_custom_settings',
'type' => 'select',
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
'value' => $use_custom_settings,
'options' => array(
0 => __( 'No', 'ultimate-member' ),
1 => __( 'Yes', 'ultimate-member' ),
),
),
array(
'id' => '_um_login_template',
'type' => 'select',
'label' => __( 'Template', 'ultimate-member' ),
'value' => UM()->query()->get_meta_value( '_um_login_template', null, UM()->options()->get( 'login_template' ) ),
'options' => UM()->shortcodes()->get_templates( 'login' ),
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
),
array(
'id' => '_um_login_max_width',
'type' => 'text',
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
'value' => UM()->query()->get_meta_value( '_um_login_max_width', null, UM()->options()->get( 'login_max_width' ) ),
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
),
array(
'id' => '_um_login_icons',
'type' => 'select',
'label' => __( 'Field Icons', 'ultimate-member' ),
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
'value' => UM()->query()->get_meta_value( '_um_login_icons', null, UM()->options()->get( 'login_icons' ) ),
'options' => array(
'field' => __( 'Show inside text field', 'ultimate-member' ),
'label' => __( 'Show with label', 'ultimate-member' ),
'off' => __( 'Turn off', 'ultimate-member' ),
),
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
),
array(
'id' => '_um_login_primary_btn_word',
'type' => 'text',
'label' => __( 'Primary Button Text', 'ultimate-member' ),
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
'value' => UM()->query()->get_meta_value( '_um_login_primary_btn_word', null, UM()->options()->get( 'login_primary_btn_word' ) ),
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
),
array(
'id' => '_um_login_secondary_btn',
'type' => 'select',
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
'value' => $login_secondary_btn,
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
'options' => array(
0 => __( 'No', 'ultimate-member' ),
1 => __( 'Yes', 'ultimate-member' ),
),
),
array(
'id' => '_um_login_secondary_btn_word',
'type' => 'text',
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, UM()->options()->get( 'login_secondary_btn_word' ) ),
'conditional' => array( '_um_login_secondary_btn', '=', 1 ),
),
array(
'id' => '_um_login_forgot_pass_link',
'type' => 'select',
'label' => __( 'Show Forgot Password Link?', 'ultimate-member' ),
'value' => $login_forgot_pass_link,
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
'options' => array(
0 => __( 'No', 'ultimate-member' ),
1 => __( 'Yes', 'ultimate-member' ),
),
),
array(
'id' => '_um_login_show_rememberme',
'type' => 'select',
'label' => __( 'Show "Remember Me"?', 'ultimate-member' ),
'value' => $login_show_rememberme,
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
'options' => array(
0 => __( 'No', 'ultimate-member' ),
1 => __( 'Yes', 'ultimate-member' ),
),
),
),
)
)->render_form();
?>
<div class="um-admin-clear"></div>
</div>