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 / dashboard-settings.php

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

260 lines 12.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 // Dashboard Settings
5
6 add_action( 'ucd_settings_content', 'ucd_dashboard_settings_page' );
7 function ucd_dashboard_settings_page() {
8 global $ucd_active_tab;
9 if ( 'dashboard-settings' != $ucd_active_tab )
10 return;
11 ?>
12
13 <h3><?php _e( 'Dashboard Branding', 'ultimate-client-dash' ); ?></h3>
14
15 <!-- Begin settings form -->
16 <form action="options.php" method="post">
17 <?php
18 settings_fields( 'ultimate-client-dash-settings' );
19 do_settings_sections( 'ultimate-client-dash-settings' );
20 $ucd_admin_footer_text = get_option( 'ucd_admin_footer_text' );
21 ?>
22
23 <!-- Dashboard Styling Option Section -->
24
25 <div class="ucd-inner-wrapper settings-dashboard">
26 <p class="ucd-settings-desc">Dashboard branding gives you the ability to customize, white label, and rebrand the WordPress dashboard to create a personalized experience.</p>
27
28 <div class="ucd-form-message"><?php settings_errors('ucd-notices'); ?></div>
29
30 <table class="form-table">
31 <tbody>
32
33 <tr class="ucd-title-holder">
34 <th><h2 class="ucd-inner-title"><?php _e( 'Theme', 'ultimate-client-dash' ); ?></h2></th>
35 </tr>
36
37 <tr>
38 <th><?php _e( 'Modern Dashboard', 'ultimate-client-dash' ); ?></th>
39 <td><label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_modern_theme" value="disable_modern_theme" <?php checked( 'disable_modern_theme', get_option( 'ucd_dashboard_modern_theme' ) ); ?> /><span class="ucd-slider round"></span></label>Enable
40 <p>
41 Give the WordPress dashboard a modern look and feel.
42 </p>
43 </td>
44 </tr>
45
46
47 <tr class="ucd-title-holder">
48 <th><h2 class="ucd-inner-title"><?php _e( 'Admin Bar', 'ultimate-client-dash' ); ?></h2></th>
49 </tr>
50
51 <tr>
52 <th><?php _e( 'Text Color', 'ultimate-client-dash' ); ?></th>
53 <td><input type="text" placeholder="" class="color-field" name="ucd_dashboard_admin_bar_text_color" value="<?php echo esc_attr( get_option('ucd_dashboard_admin_bar_text_color') ); ?>" size="50" />
54 <p>
55 Select a text color for the admin bar and active menu items.
56 </p>
57 </td>
58 </tr>
59
60 <tr>
61 <th><?php _e( 'Background Color', 'ultimate-client-dash' ); ?><p>Commonly used as an accent color.</p></th>
62 <td><input type="text" placeholder="" class="color-field" name="ucd_dashboard_accent" value="<?php echo esc_attr( get_option('ucd_dashboard_accent') ); ?>" size="50" />
63 <p>
64 Select a background color for the admin bar and active menu items.
65 </p>
66 </td>
67 </tr>
68
69 <tr>
70 <th><?php _e( 'Admin Bar Menu', 'ultimate-client-dash' ); ?>
71 <p>Hide default links from admin bar menu for user role 'Client'.</p></th>
72 <td>
73 <div class="ucd-inline-option ucd-admin-bar-menu">
74 <label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_admin_bar_updates_link" value="#wp-admin-bar-updates" <?php checked( '#wp-admin-bar-updates', get_option( 'ucd_dashboard_admin_bar_updates_link' ) ); ?> /><span class="ucd-slider round"></span></label><?php _e( 'Hide', 'ultimate-client-dash' ); ?>
75 <p><?php _e( 'Updates', 'ultimate-client-dash' ); ?></p>
76 </div>
77 <div class="ucd-inline-option ucd-admin-bar-menu">
78 <label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_admin_bar_comments_link" value="#wp-admin-bar-comments" <?php checked( '#wp-admin-bar-comments', get_option( 'ucd_dashboard_admin_bar_comments_link' ) ); ?> /><span class="ucd-slider round"></span></label><?php _e( 'Hide', 'ultimate-client-dash' ); ?>
79 <p><?php _e( 'Comments', 'ultimate-client-dash' ); ?></p>
80 </div>
81 <div class="ucd-inline-option ucd-admin-bar-menu">
82 <label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_admin_bar_add_new_Menu" value="#wp-admin-bar-new-content" <?php checked( '#wp-admin-bar-new-content', get_option( 'ucd_dashboard_admin_bar_add_new_Menu' ) ); ?> /><span class="ucd-slider round"></span></label><?php _e( 'Hide', 'ultimate-client-dash' ); ?>
83 <p><?php _e( 'New Content', 'ultimate-client-dash' ); ?></p>
84 </div>
85 </td>
86 </tr>
87
88 <tr>
89 <th><?php _e( 'Screen Options', 'ultimate-client-dash' ); ?></th>
90 <td><label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_admin_bar_screen_options" value="ucd_dashboard_admin_bar_screen_options" <?php checked( 'ucd_dashboard_admin_bar_screen_options', get_option( 'ucd_dashboard_admin_bar_screen_options' ) ); ?> /><span class="ucd-slider round"></span></label>Hide
91 <p>
92 Hide screen options tab from the admin bar for user role 'Client'.
93 </p>
94 </td>
95 </tr>
96
97 <tr>
98 <th><?php _e( 'Help Box', 'ultimate-client-dash' ); ?></th>
99 <td><label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_admin_bar_help" value="ucd_dashboard_admin_bar_help" <?php checked( 'ucd_dashboard_admin_bar_help', get_option( 'ucd_dashboard_admin_bar_help' ) ); ?> /><span class="ucd-slider round"></span></label>Hide
100 <p>
101 Hide help box tab from the admin bar for user role 'Client'.
102 </p>
103 </td>
104 </tr>
105
106
107 <tr class="ucd-title-holder">
108 <th><h2 class="ucd-inner-title"><?php _e( 'Admin Menu', 'ultimate-client-dash' ); ?></h2></th>
109 </tr>
110
111 <tr class="ucd-pro-version">
112 <th><?php _e( 'Dashboard Logo', 'ultimate-client-dash' ); ?></th>
113 <td>
114 <div>
115 <input type="text" name="ucd_admin_menu_logo" id="admin_logo_image_url" value="<?php echo esc_attr( get_option('ucd_admin_menu_logo') ); ?>" class="regular-text">
116 <input type="button" name="upload-btn-admin-logo" id="upload-btn-admin-logo" class="button-secondary" value="Upload Image">
117 </div>
118 <p>
119 Logo will appear at the top of the admin menu. Max width: 140px.
120 </p>
121 </td>
122 </tr>
123
124 <tr>
125 <th><?php _e( 'Main Menu', 'ultimate-client-dash' ); ?></th>
126 <td>
127 <div class="ucd-inline-option">
128 <input type="text" placeholder="" class="color-field" name="ucd_dashboard_text_color" value="<?php echo esc_attr( get_option('ucd_dashboard_text_color') ); ?>" size="50" />
129 <p><?php _e( 'Text', 'ultimate-client-dash' ); ?></p>
130 </div>
131 <div class="ucd-inline-option">
132 <input type="text" placeholder="" class="color-field" name="ucd_dashboard_background_dark" value="<?php echo esc_attr( get_option('ucd_dashboard_background_dark') ); ?>" size="50" />
133 <p><?php _e( 'Background', 'ultimate-client-dash' ); ?></p>
134 </div>
135 </td>
136 </tr>
137
138 <tr>
139 <th><?php _e( 'Submenu', 'ultimate-client-dash' ); ?></th>
140 <td>
141 <div class="ucd-inline-option ucd-admin-bar-menu">
142 <input type="text" placeholder="" class="color-field" name="ucd_dashboard_submenu_text_color" value="<?php echo esc_attr( get_option('ucd_dashboard_submenu_text_color') ); ?>" size="50" />
143 <p><?php _e( 'Submenu Text', 'ultimate-client-dash' ); ?></p>
144 </div>
145 <div class="ucd-inline-option ucd-admin-bar-menu">
146 <input type="text" placeholder="" class="color-field" name="ucd_dashboard_background_light" value="<?php echo esc_attr( get_option('ucd_dashboard_background_light') ); ?>" size="50" />
147 <p><?php _e( 'Submenu Background', 'ultimate-client-dash' ); ?></p>
148 </div>
149 </td>
150 </tr>
151
152 <tr>
153 <th><?php _e( 'Menu Item Seperator', 'ultimate-client-dash' ); ?>
154 <p>Only applicable if modern dashboard is enabled.</p></th>
155 <td><input type="text" placeholder="" class="color-field" name="ucd_dashboard_border_color" value="<?php echo esc_attr( get_option('ucd_dashboard_border_color') ?: 'rgba(255, 255, 255, 0.075)' ); ?>" size="50" />
156 <p>
157 Select a color for the horizontal separators between menu items.
158 </p>
159 </td>
160 </tr>
161
162
163 <tr class="ucd-title-holder">
164 <th><h2 class="ucd-inner-title"><?php _e( 'Extra Settings', 'ultimate-client-dash' ); ?></h2></th>
165 </tr>
166
167 <tr>
168 <th><?php _e( 'Link & Button Colors', 'ultimate-client-dash' ); ?></th>
169 <td><input type="text" placeholder="" class="color-field" name="ucd_dashboard_link_text_color" value="<?php echo esc_attr( get_option('ucd_dashboard_link_text_color') ); ?>" size="50" />
170 <p>
171 Change the link and button colors throughout the WordPress dashboard.
172 </p>
173 </td>
174 </tr>
175
176 <tr>
177 <th>Replace Howdy Text</th>
178 <td><input class="regular-text" type="text" placeholder="Hello" name="ucd_howdy_text" value="<?php echo esc_attr( get_option('ucd_howdy_text') ); ?>" size="30" />
179 <p>
180 Customize the "Howdy" text for logged in users.
181 </p>
182 </td>
183 </tr>
184
185 <tr class="ucd-pro-version">
186 <th><?php _e( 'White Label WordPress', 'ultimate-client-dash' ); ?></th>
187 <td>
188 <p><label class="ucd-switch"><input type="checkbox" name="ucd_dashboard_hide_wp_logo" value="#wpadminbar #wp-admin-bar-wp-logo>.ab-item"<?php checked( '#wpadminbar #wp-admin-bar-wp-logo>.ab-item', get_option( 'ucd_dashboard_hide_wp_logo' ) ); ?> /><span class="ucd-slider round"></span></label>Enable</p>
189 <p>
190 Remove the WordPress reference in the admin bar and dashboard footer.
191 </p>
192 </td>
193 </tr>
194
195 <tr>
196 <th><?php _e( 'Footer WP Version', 'ultimate-client-dash' ); ?></th>
197 <td><label class="ucd-switch"><input type="checkbox" name="ucd_admin_footer_version" value="#footer-upgrade" <?php checked( '#footer-upgrade', get_option( 'ucd_admin_footer_version' ) ); ?> /><span class="ucd-slider round"></span></label>Hide
198 <p>
199 Hide the current WordPress version from dashboard footer.
200 </p>
201 </td>
202 </tr>
203
204 <tr>
205 <th>
206 <?php _e( 'Custom Footer Text', 'ultimate-client-dash' ); ?>
207 <p>
208 Enter the text you would like to display in the dashboard footer by replacing the default text. HTML markup can be used.
209 </p>
210 </th>
211
212 <td class="ucd-custom-content">
213 <?php
214 wp_editor( $ucd_admin_footer_text , 'ucd_admin_footer_text', array(
215 'wpautop' => false,
216 'media_buttons' => true,
217 'textarea_name' => 'ucd_admin_footer_text',
218 'editor_class' => 'ucd-custom-footer',
219 'textarea_rows' => 5
220 ) );
221 ?>
222 </td>
223 </tr>
224
225
226 <tr class="ucd-title-holder">
227 <th><h2 class="ucd-inner-title"><?php _e( 'Advanced Settings', 'ultimate-client-dash' ); ?></h2></th>
228 </tr>
229
230 <tr class="ucd-pro-version">
231 <th><?php _e( 'Dashboard Custom CSS - All Roles', 'ultimate-client-dash' ); ?>
232 <p>Enter your dashboard custom CSS here that applies to all user roles.</p>
233 </th>
234 <td><textarea rows="10" cols="100" type="textarea" placeholder="" name="ucd_pro_dashboard_custom_css" value="<?php echo esc_attr( get_option('ucd_pro_dashboard_custom_css') ); ?>" ><?php echo esc_attr( get_option('ucd_pro_dashboard_custom_css') ); ?></textarea>
235 <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>
236 </td>
237 </tr>
238
239 <tr class="ucd-pro-version">
240 <th><?php _e( 'Dashboard Custom CSS - Clients Only', 'ultimate-client-dash' ); ?>
241 <p>Enter your dashboard custom CSS here that only applies to the 'Client' user role.</p>
242 </th>
243 <td><textarea rows="10" cols="100" type="textarea" placeholder="" name="ucd_pro_dashboard_client_custom_css" value="<?php echo esc_attr( get_option('ucd_pro_dashboard_client_custom_css') ); ?>" ><?php echo esc_attr( get_option('ucd_pro_dashboard_client_custom_css') ); ?></textarea>
244 <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>
245 </td>
246 </tr>
247
248
249 <tr class="ucd-float-option">
250 <th class="ucd-save-section dashboard">
251 <?php submit_button(); ?>
252 </th>
253 </tr>
254
255 </tbody>
256 </table>
257 </div>
258 </form>
259 <?php }
260