PluginProbe
Ultimate Client Dash / trunk
Ultimate Client Dash vtrunk
trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7.5 1.8 1.8.5 1.9 2.0 2.1 2.2 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 All 35 releases
ulimate-client-dash / admin / settings / login-settings.php

login-settings.php in Ultimate Client Dash trunk, at admin/settings/login-settings.php

212 lines 9.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 // Login Page Content
5
6 add_action( 'ucd_settings_content', 'ucd_login_settings_page' );
7 function ucd_login_settings_page() {
8 global $ucd_active_tab;
9 if ( 'login-settings' != $ucd_active_tab )
10 return;
11 ?>
12
13 <h3><?php _e( 'Login Page Branding', 'ultimate-client-dash' ); ?></h3>
14
15 <form action="options.php" method="post">
16 <?php
17 settings_fields( 'ultimate-client-dash-login' );
18 do_settings_sections( 'ultimate-client-dash-login' );
19 $ucd_login_custom_content = get_option( 'ucd_login_custom_content' );
20 $ucd_widget_body = get_option( 'ucd_widget_body' );
21 ?>
22
23 <!-- Dashboard Styling Option Section -->
24
25 <div class="ucd-inner-wrapper settings-login">
26 <p class="ucd-settings-desc">Login page branding allows you to personalize the WordPress login page by adding your own logo, colors, background image, and text.</p>
27
28 <div class="ucd-form-message"><?php settings_errors('ucd-notices'); ?></div>
29
30 <table class="form-table">
31 <tbody>
32
33
34 <tr class="ucd-title-holder">
35 <th><h2 class="ucd-inner-title"><?php _e( '', 'ultimate-client-dash' ); ?>Logo</h2></th>
36 </tr>
37
38 <!-- Login Styling Option Section -->
39 <tr>
40 <th><?php _e( 'Login Logo', 'ultimate-client-dash' ); ?></th>
41 <td>
42 <div>
43 <input type="text" name="ucd_login_logo" id="image_url" value="<?php echo esc_attr( get_option('ucd_login_logo') ); ?>" class="regular-text">
44 <input type="button" name="upload-btn" id="upload-btn" class="button-secondary" value="Upload Image">
45 </div>
46 <p>
47 Replace the default WordPress logo. Max width: 320px.
48 </p>
49 </td>
50 </tr>
51
52 <tr>
53 <th><?php _e( 'Logo Size', 'ultimate-client-dash' ); ?>
54 <p>Max width: 320px</p></th>
55 <td>
56 <div class="ucd-inline-option">
57 <input class="input-short" type="text" placeholder="320px" name="ucd_logo_width" value="<?php echo esc_attr( get_option('ucd_logo_width') ); ?>" size="8" />
58 <p>Width (px)</p>
59 </div>
60 <div class="ucd-inline-option">
61 <input class="input-short" type="text" name="ucd_logo_height" value="<?php echo esc_attr( get_option('ucd_logo_height') ); ?>" size="8" />
62 <p>Height (px)</p>
63 </div>
64 <div class="ucd-inline-option">
65 <input class="input-short" type="text" name="ucd_logo_padding_bottom" value="<?php echo esc_attr( get_option('ucd_logo_padding_bottom') ?: '5px' ); ?>" size="8" />
66 <p>Margin Bottom</p>
67 </div>
68 </td>
69 </tr>
70
71 <tr class="ucd-title-holder">
72 <th><h2 class="ucd-inner-title"><?php _e( 'Colors & Background', 'ultimate-client-dash' ); ?></h2></th>
73 </tr>
74
75 <tr>
76 <th><?php _e( 'Text & Link Color', 'ultimate-client-dash' ); ?>
77 </th>
78 <td><input type="text" placeholder="" class="color-field" name="ucd_login_body_text_color" value="<?php echo esc_attr( get_option('ucd_login_body_text_color') ); ?>" size="50" />
79 <p>Select a text color for the login page. Note: This does not affect the login form.</p>
80 </td>
81 </tr>
82
83 <tr>
84 <th><?php _e( 'Background Color', 'ultimate-client-dash' ); ?></th>
85 <td><input type="text" placeholder="" class="color-field" name="ucd_login_background_color" value="<?php echo esc_attr( get_option('ucd_login_background_color') ); ?>" size="50" />
86 <p>Select a background color for the login page.</p>
87 </td>
88 </tr>
89
90 <tr class="ucd-pro-version">
91 <th><?php _e( 'Background Image', 'ultimate-client-dash' ); ?></th>
92 <td>
93 <div>
94 <input type="text" name="ucd_login_background_image" id="image_url_two" value="<?php echo esc_attr( get_option('ucd_login_background_image') ); ?>" class="regular-text">
95 <input type="button" name="upload-btn-two" id="upload-btn-two" class="button-secondary" value="Upload Image">
96 </div>
97 <p>Add a background image to the login page.</p>
98 </td>
99 </tr>
100
101 <tr>
102 <th><?php _e( 'Background Overlay', 'ultimate-client-dash' ); ?>
103 <p>Add a colored overlay to the background image.</p>
104 </th>
105 <td>
106 <div class="ucd-inline-option">
107 <input type="text" placeholder="" class="color-field" name="ucd_login_overlay_color" value="<?php echo esc_attr( get_option('ucd_login_overlay_color') ); ?>" size="50" />
108 <p>
109 Overlay Color
110 </p>
111 </div>
112 <div class="ucd-inline-option">
113 <input class="input-short" type="text" placeholder="" name="ucd_login_overlay_opacity" value="<?php echo esc_attr( get_option('ucd_login_overlay_opacity') ?: '0.5' ); ?>" size="8" />
114 <p>
115 Overylay Opacity (default 0.5)
116 </p>
117 </div>
118 </td>
119 </tr>
120
121 <tr class="ucd-title-holder">
122 <th><h2 class="ucd-inner-title"><?php _e( 'Extra Settings', 'ultimate-client-dash' ); ?></h2></th>
123 </tr>
124
125 <tr>
126 <th><?php _e( 'Lost Password Link', 'ultimate-client-dash' ); ?></th>
127 <td><label class="ucd-switch"><input type="checkbox" name="ucd_login_hide_password_link" value="hide_password_link" <?php checked( 'hide_password_link', get_option( 'ucd_login_hide_password_link' ) ); ?> /><span class="ucd-slider round"></span></label>Hide
128 <p>
129 Hide the lost password link from the login page.
130 </p>
131 </td>
132 </tr>
133
134 <tr>
135 <th><?php _e( 'Back To Link', 'ultimate-client-dash' ); ?></th>
136 <td><label class="ucd-switch"><input type="checkbox" name="ucd_login_hide_main_site_link" value="hide_main_site_link" <?php checked( 'hide_main_site_link', get_option( 'ucd_login_hide_main_site_link' ) ); ?> /><span class="ucd-slider round"></span></label>Hide
137 <p>
138 Hide the back to link from the login page.
139 </p>
140 </td>
141 </tr>
142
143 <tr>
144 <th><?php _e( 'Replace Logo URL', 'ultimate-client-dash' ); ?></th>
145 <td><input type="text" placeholder="https://" name="ucd_login_logo_url" value="<?php echo esc_attr( get_option('ucd_login_logo_url') ); ?>" size="70" />
146 <p>
147 When login logo is clicked, the user will be redirected to this url. Default home url.
148 </p>
149 </td>
150 </tr>
151
152 <tr>
153 <th><?php _e( 'Replace Logo Alt Text', 'ultimate-client-dash' ); ?></th>
154 <td><input type="text" placeholder="" name="ucd_login_logo_title" value="<?php echo esc_attr( get_option('ucd_login_logo_title') ); ?>" size="70" />
155 <p>
156 Alt text shown when mouse is hovered over the login logo.
157 </p>
158 </td>
159 </tr>
160
161 <tr class="ucd-title-holder">
162 <th><h2 class="ucd-inner-title"><?php _e( 'Login Footer', 'ultimate-client-dash' ); ?></h2></th>
163 </tr>
164
165 <tr>
166 <th>
167 <?php _e( 'Custom Footer Text', 'ultimate-client-dash' ); ?>
168 <p>Add custom text to the login page footer.<br>e.g. Built by company name</p>
169 </th>
170
171 <td class="ucd-custom-content">
172 <?php
173 wp_editor( $ucd_login_custom_content , 'ucd_login_custom_content', array(
174 'wpautop' => false,
175 'media_buttons' => true,
176 'textarea_name' => 'ucd_login_custom_content',
177 'editor_class' => 'my_custom_class',
178 'textarea_rows' => 5
179 ) );
180 ?>
181 <p>Tip: You can adjust the alignment of the footer text by using the align tool on the toolbar.</p>
182 </td>
183 </tr>
184
185 <tr class="ucd-title-holder">
186 <th><h2 class="ucd-inner-title"><?php _e( 'Advanced Settings', 'ultimate-client-dash' ); ?></h2></th>
187 </tr>
188
189
190 <tr class="ucd-pro-version">
191 <th><?php _e( 'Login Page Custom CSS', 'ultimate-client-dash' ); ?>
192 <p>Enter your login page custom CSS here.</p>
193 </th>
194 <td><textarea rows="10" cols="100" type="textarea" placeholder="" name="ucd_pro_login_custom_css" value="<?php echo esc_attr( get_option('ucd_pro_login_custom_css') ); ?>" ><?php echo esc_attr( get_option('ucd_pro_login_custom_css') ); ?></textarea>
195 <p>In case if you need to overwrite any CSS setting, you can add !important at the end of CSS property. eg: color: #da2234 !important;</p>
196 </td>
197 </tr>
198
199
200 <tr class="ucd-float-option">
201 <th class="ucd-save-section">
202 <?php submit_button(); ?>
203 <a class="ucd-preview-button" href="<?php echo site_url(); ?>/?ucd-preview-login-page" target="_blank">Preview Login Page</a>
204 </th>
205 </tr>
206
207 </tbody>
208 </table>
209 </div>
210 </form>
211 <?php }
212