PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.4.6
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.4.6
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
← All changes | src/Admin/Views/Control.php +77 -312 1.5.21.4.6 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2
3 3 /**
4 - * Control class for Control options.
4 + * Views class for Shortcode generator options.
5 5 *
6 6 * @link https://themeatelier.net
7 7 * @since 1.0.0
8 8 *
@@ -31,12 +31,8 @@
31 31 'title' => esc_html__('CONTROLS', 'darkify'),
32 32 'icon' => 'icofont-ui-settings',
33 33 'fields' => array(
34 34 array(
35 - 'type' => 'notice',
36 - 'content' => __('<h3>Things Not Working as Expected?</h3>Every theme and page layout is built differently. If a section doesn’t turn dark, it’s usually using a background image, inline style, or custom CSS. Use Darkify’s control settings (color overrides, image filters, exclusions, or custom CSS) to fine-tune the result. If you still need help, <a href="https://wordpress.org/support/plugin/darkify/#new-topic-0" target="_blank">create a support topic</a> anytime—we’re happy to assist.', 'darkify'),
37 - ),
38 - array(
39 35 'type' => 'section_tab',
40 36 'tabs' => array(
41 37
42 38 array(
@@ -44,20 +40,15 @@
44 40 'icon' => 'icofont-computer',
45 41 'fields' => array(
46 42 array(
47 43 'type' => 'heading',
48 - 'content' => esc_html__('Basic Controls', 'darkify'),
44 + 'content' => esc_html__('Basic Control', 'darkify'),
49 45 ),
50 46 array(
51 47 'id' => 'enable_dark_mode_switch',
52 48 'type' => 'switcher',
53 - 'title' => esc_html__('Frontend Dark Mode', 'darkify'),
54 - 'title_help' => '<div class="darkify-info-label">' .
55 - __('Show the dark mode floating switch on your website frontend.', 'darkify') .
56 - '</div>' . '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
57 - esc_html__('Live Demo', 'darkify') . '</a>' . '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
58 - esc_html__('Open Docs', 'darkify') .
59 - '</a>',
49 + 'title' => esc_html__('Frontend Dark Mode', 'darkify'),
50 + 'title_help' => '<div class="darkify-info-label">' . __('Show the dark mode floating switch in your Website\'s frontend.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/controls/" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/control/" target="_blank">' . __('Open Docs', 'darkify') . '</a>',
60 51 'text_on' => esc_html__('Enabled', 'darkify'),
61 52 'text_off' => esc_html__('Disabled', 'darkify'),
62 53 'text_width' => 100,
63 54 'default' => true,
@@ -64,39 +55,30 @@
64 55 ),
65 56 array(
66 57 'id' => 'enable_default_dark_mode',
67 58 'type' => 'switcher',
68 - 'title' => esc_html__('Default Dark Mode', 'darkify'),
69 - 'title_help' =>
70 - '<div class="darkify-info-label">' .
71 - __('Enable dark mode by default on your website.', 'darkify') .
72 - '</div>' .
73 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
74 - esc_html__('Live Demo', 'darkify') .
75 - '</a>' .
76 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
77 - esc_html__('Open Docs', 'darkify') .
78 - '</a>',
79 - 'text_on' => esc_html__('Enabled', 'darkify'),
80 - 'text_off' => esc_html__('Disabled', 'darkify'),
59 + 'title' => esc_html__('Default Dark Mode', 'darkify'),
60 + 'title_help' => '<div class="darkify-info-label">' . __('Automatically turn your website dark by default.', 'darkify') . '</div>',
61 + 'text_on' => esc_html__('Enabled', 'darkify'),
62 + 'text_off' => esc_html__('Disabled', 'darkify'),
81 63 'text_width' => 100,
64 + // 'title_video' => '<div class="darkify-img-tag">
65 + // <video autoplay loop muted playsinline>
66 + // <source src="https://plugins.svn.wordpress.org/darkify/assets/video/os-aware-darkmode.webm" type="video/webm">
67 + // </video>
68 + // </div><div class="darkify-info-label">Auto Convert Dropdowns to Button</div>',
82 69 ),
83 70 array(
84 71 'id' => 'enable_os_aware',
85 72 'type' => 'switcher',
86 - 'title' => esc_html__('OS Aware Dark Mode', 'darkify'),
87 - 'title_help' =>
88 - '<div class="darkify-info-label">' .
89 - __('Toggle dark mode based on the user’s device or operating system preference.', 'darkify') .
90 - '</div>' .
91 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
92 - esc_html__('Live Demo', 'darkify') .
93 - '</a>' .
94 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
95 - esc_html__('Open Docs', 'darkify') .
96 - '</a>',
97 - 'text_on' => esc_html__('Enabled', 'darkify'),
98 - 'text_off' => esc_html__('Disabled', 'darkify'),
73 + 'title' => esc_html__('OS Aware Dark Mode', 'darkify'),
74 + 'title_video' => '<div class="darkify-img-tag">
75 + <video autoplay loop muted playsinline>
76 + <source src="https://plugins.svn.wordpress.org/darkify/assets/videos/os-aware-darkmode.webm" type="video/webm">
77 + </video>
78 + </div><div class="darkify-info-label">Dark Mode toggling based on OS setting</div>',
79 + 'text_on' => esc_html__('Enabled', 'darkify'),
80 + 'text_off' => esc_html__('Disabled', 'darkify'),
99 81 'text_width' => 100,
100 82 'default' => true,
101 83 ),
102 84 array(
@@ -101,27 +83,18 @@
101 83 ),
102 84 array(
103 85 'id' => 'enable_keyboard_shortcut',
104 86 'type' => 'switcher',
105 - 'title' => esc_html__('Keyboard Shortcut', 'darkify'),
106 - 'title_help' =>
107 - '<div class="darkify-info-label">' .
108 - __('Toggle dark mode using a keyboard shortcut. Use Ctrl + Alt + D on Windows, and Control + Option + D on macOS.', 'darkify') .
109 - '</div>' .
110 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
111 - esc_html__('Live Demo', 'darkify') .
112 - '</a>' .
113 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#basic-control-options') . '" target="_blank" rel="noopener noreferrer">' .
114 - esc_html__('Open Docs', 'darkify') .
115 - '</a>',
116 - 'text_on' => esc_html__('Enabled', 'darkify'),
117 - 'text_off' => esc_html__('Disabled', 'darkify'),
87 + 'title' => esc_html__('Keyboard Shortcut', 'darkify'),
88 + 'title_help' => '<div class="darkify-info-label">' . __('Enable to dark mode by pressing Ctrl+Alt+D on windows keyboard & Ctrl+Opt|Start+D on mac.', 'darkify') . '</div>',
89 + 'text_on' => esc_html__('Enabled', 'darkify'),
90 + 'text_off' => esc_html__('Disabled', 'darkify'),
118 91 'text_width' => 100,
119 92 'default' => true,
120 93 ),
121 94 array(
122 95 'type' => 'heading',
123 - 'title' => esc_html__('Advanced Controls', 'darkify'),
96 + 'title' => esc_html__('Advanced Control', 'darkify'),
124 97 ),
125 98 // Enable Time Based Auto Dark Mode
126 99 array(
127 100 'id' => 'enable_time',
@@ -130,64 +103,27 @@
130 103 array(
131 104 'id' => 'enable_time_based_dark',
132 105 'type' => 'switcher',
133 106 'title' => esc_html__('Time Based Auto Dark Mode', 'darkify'),
134 - 'title_help' =>
135 - '<div class="darkify-info-label">' .
136 - __('Automatically enable dark mode based on the user’s local time.', 'darkify') .
137 - '</div>' .
138 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
139 - esc_html__('Live Demo', 'darkify') .
140 - '</a>' .
141 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
142 - esc_html__('Open Docs', 'darkify') .
143 - '</a>',
144 - 'text_on' => esc_html__('Enabled', 'darkify'),
145 - 'text_off' => esc_html__('Disabled', 'darkify'),
107 + 'title_help' => '<div class="darkify-info-label">' . __('Automatically turn dark mode ON based on users’ localtime.', 'darkify') . '</div>',
108 + 'text_on' => esc_html__('Enabled', 'darkify'),
109 + 'text_off' => esc_html__('Disabled', 'darkify'),
146 110 'text_width' => 100,
147 111 ),
148 112 array(
149 - 'id' => 'enable_time_fields',
150 - 'type' => 'fieldset',
151 - 'class' => 'enable_time_fields',
113 + 'id' => 'time_based_dark_start',
114 + 'type' => 'datetime',
115 + 'title' => esc_html__('Pick a Time', 'darkify'),
116 + 'from_to' => true,
117 + 'text_from' => esc_html__('Form', 'darkify'),
118 + 'text_to' => esc_html__('To', 'darkify'),
119 + 'settings' => array(
120 + 'noCalendar' => true,
121 + 'enableTime' => true,
122 + 'dateFormat' => 'H:i',
123 + 'time_24hr' => false,
124 + ),
152 125 'dependency' => array('enable_time_based_dark', '==', 'true'),
153 - 'title' => esc_html__('Pick a Time', 'darkify'),
154 - 'title_help' =>
155 - '<div class="darkify-info-label">' .
156 - __('Set the exact start and end times when dark mode should be automatically enabled or disabled.', 'darkify') .
157 - '</div>' .
158 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
159 - esc_html__('Live Demo', 'darkify') .
160 - '</a>' .
161 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
162 - esc_html__('Open Docs', 'darkify') .
163 - '</a>',
164 - 'fields' => array(
165 - array(
166 - 'id' => 'time_based_dark_start',
167 - 'type' => 'datetime',
168 - 'after' => esc_html__('From', 'darkify'),
169 - 'placeholder' => esc_html__('From', 'darkify'),
170 - 'settings' => array(
171 - 'noCalendar' => true,
172 - 'enableTime' => true,
173 - 'dateFormat' => 'H:i',
174 - 'time_24hr' => false,
175 - ),
176 - ),
177 - array(
178 - 'id' => 'time_based_dark_end',
179 - 'type' => 'datetime',
180 - 'after' => esc_html__('To', 'darkify'),
181 - 'placeholder' => esc_html__('To', 'darkify'),
182 - 'settings' => array(
183 - 'noCalendar' => true,
184 - 'enableTime' => true,
185 - 'dateFormat' => 'H:i',
186 - 'time_24hr' => false,
187 - ),
188 - ),
189 - ),
190 126 ),
191 127 ),
192 128 ),
193 129 array(
@@ -192,23 +128,12 @@
192 128 ),
193 129 array(
194 130 'id' => 'hide_on_desktop',
195 131 'type' => 'switcher',
196 - 'title' => esc_html__('Hide Dark Mode Switch on Desktop', 'darkify'),
197 - 'title_help' =>
198 - '<div class="darkify-info-label">' .
199 - __('Hide the dark mode floating switch when users are browsing on a desktop or laptop.', 'darkify') .
200 - '</div>' .
201 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
202 - esc_html__('Live Demo', 'darkify') .
203 - '</a>' .
204 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
205 - esc_html__('Open Docs', 'darkify') .
206 - '</a>',
207 -
208 - 'text_on' => esc_html__('Yes', 'darkify'),
209 - 'text_off' => esc_html__('No', 'darkify'),
210 -
132 + 'title' => esc_html__('Hide Dark Mode Switch On Desktop', 'darkify'),
133 + 'title_help' => '<div class="darkify-info-label">' . __('Hide the Dark Mode Floating Switch if users’ are using desktop or laptop.', 'darkify') . '</div>',
134 + 'text_on' => esc_html__('Yes', 'darkify'),
135 + 'text_off' => esc_html__('No', 'darkify'),
211 136 ),
212 137 array(
213 138 'id' => 'hide_on_mobile',
214 139 'type' => 'fieldset',
@@ -215,46 +140,22 @@
215 140 'fields' => array(
216 141 array(
217 142 'id' => 'hide_dark_mode_on_mobile',
218 143 'type' => 'switcher',
219 - 'title' => esc_html__('Hide Dark Mode on Mobile', 'darkify'),
220 - 'title_help' =>
221 - '<div class="darkify-info-label">' .
222 - __('Hide the dark mode floating switch when users are browsing on mobile devices.', 'darkify') .
223 - '</div>' .
224 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
225 - esc_html__('Live Demo', 'darkify') .
226 - '</a>' .
227 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
228 - esc_html__('Open Docs', 'darkify') .
229 - '</a>',
230 -
231 - 'text_on' => esc_html__('Yes', 'darkify'),
232 - 'text_off' => esc_html__('No', 'darkify'),
233 -
144 + 'title' => esc_html__('Hide Dark Mode On Mobile', 'darkify'),
145 + 'title_help' => '<div class="darkify-info-label">' . __('Hide the Dark Mode Floating Switch if users’ are using mobile.', 'darkify') . '</div>',
146 + 'text_on' => esc_html__('Yes', 'darkify'),
147 + 'text_off' => esc_html__('No', 'darkify'),
234 148 ),
235 149 array(
236 150 'id' => 'type_of_hide_by',
237 151 'type' => 'button_set',
238 - 'title' => esc_html__('Hide Detection Method', 'darkify'),
239 -
240 - 'title_help' =>
241 - '<div class="darkify-info-label">' .
242 - __('Choose how mobile devices are detected: by User Agent, by Screen Size, or use Both for maximum accuracy.', 'darkify') .
243 - '</div>' .
244 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
245 - esc_html__('Live Demo', 'darkify') .
246 - '</a>' .
247 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
248 - esc_html__('Open Docs', 'darkify') .
249 - '</a>',
250 -
152 + 'title' => esc_html__('Hide By', 'darkify'),
251 153 'options' => array(
252 154 'user_agent' => esc_html__('User Agent', 'darkify'),
253 155 'screen_size' => esc_html__('Screen Size', 'darkify'),
254 156 'both' => esc_html__('Both', 'darkify'),
255 157 ),
256 -
257 158 'default' => 'both',
258 159 'dependency' => array('hide_dark_mode_on_mobile', '==', 'true'),
259 160 ),
260 161 ),
@@ -265,113 +166,46 @@
265 166 'fields' => array(
266 167 array(
267 168 'id' => 'enable_switch_in_menu',
268 169 'type' => 'switcher',
269 - 'title' => esc_html__('Show Switch in Menu', 'darkify'),
270 -
271 - 'title_help' =>
272 - '<div class="darkify-info-label">' .
273 - __('Show the dark mode toggle switch in a selected menu.', 'darkify') .
274 - '</div>' .
275 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
276 - esc_html__('Live Demo', 'darkify') .
277 - '</a>' .
278 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#menu-integration') . '" target="_blank" rel="noopener noreferrer">' .
279 - esc_html__('Open Docs', 'darkify') .
280 - '</a>',
281 -
282 - 'text_on' => esc_html__('Yes', 'darkify'),
283 - 'text_off' => esc_html__('No', 'darkify'),
284 -
170 + 'title' => esc_html__('Show Switch In Menu', 'darkify'),
171 + 'title_help' => '<div class="darkify-info-label">' . __('Show the dark mode toggle switch in specific menu.', 'darkify') . '</div>',
172 + 'text_on' => esc_html__('Yes', 'darkify'),
173 + 'text_off' => esc_html__('No', 'darkify'),
285 174 ),
286 175 array(
287 176 'id' => 'select_menus',
288 177 'type' => 'group',
289 - 'title' => esc_html__('Menu Switch Settings', 'darkify'),
290 -
291 - 'title_help' =>
292 - '<div class="darkify-info-label">' .
293 - __('Configure menu switch options and placement for your site.', 'darkify') .
294 - '</div>' .
295 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
296 - esc_html__('Live Demo', 'darkify') .
297 - '</a>' .
298 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#menu-integration') . '" target="_blank" rel="noopener noreferrer">' .
299 - esc_html__('Open Docs', 'darkify') .
300 - '</a>',
301 -
302 - 'add_more_text' => sprintf(
303 - /* translators: %s: URL to the Darkify Pro pricing page. */
304 - __(
305 - 'Want to use the switch in an unlimited number of menus? <a target="_blank" href="%s"><strong>Upgrade to Pro</strong></a>.',
306 - 'darkify'
307 - ),
308 - esc_url(DARKIFY_DEMO_URL . 'pricing/?ref=1')
309 - ),
310 -
178 + 'title' => esc_html__('Select Menus', 'darkify'),
311 179 'accordion_title_number' => true,
312 180 'accordion_title_auto' => true,
313 181 'class' => 'select_menus',
314 - 'max' => 1,
315 -
182 + 'max' => '1',
183 + 'add_more_text' => __('Want to use switch in unlimited number of menus? <a target="_blank" href="https://darkifywp.com/pricing/?ref=1"><b>Upgrade To Pro!</b></a>', 'darkify'),
316 184 'fields' => array(
317 185 array(
318 186 'id' => 'switch_in_menu_location',
319 187 'type' => 'select',
320 188 'class' => 'select_menu_location',
321 - 'title' => esc_html__('Select Menu', 'darkify'),
322 - 'title_help' =>
323 - '<div class="darkify-info-label">' .
324 - esc_html__('Choose a menu from the dropdown list.', 'darkify') .
325 - '</div>' .
326 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
327 - esc_html__('Live Demo', 'darkify') .
328 - '</a>' .
329 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#menu-integration') . '" target="_blank" rel="noopener noreferrer">' .
330 - esc_html__('Open Docs', 'darkify') .
331 - '</a>',
332 - 'empty_message' => esc_html__(
333 - 'You have not created a menu yet. If you are using a Full Site Editing (FSE) theme, copy the shortcode below and paste it where you want the switch to appear.',
334 - 'darkify'
335 - ),
336 - 'options' => 'menus',
189 + 'title' => esc_html__('Select Menu', 'darkify'),
190 + 'options' => 'menus',
191 + 'empty_message' => esc_html__('You haven\'t created a menu yet. If you\'re using an FSE theme, copy the shortcode below and paste it where you want the switch to appear.', 'darkify'),
337 192 ),
338 193 array(
339 194 'id' => 'darkify_menu_shortcode_helper',
340 195 'type' => 'textarea',
341 - 'title' => esc_html__('Shortcode for Menu', 'darkify'),
342 - 'title_help' =>
343 - '<div class="darkify-info-label">' .
344 - __('You can customize the shortcode options based on your preference.', 'darkify') .
345 - '</div>' .
346 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
347 - esc_html__('Live Demo', 'darkify') .
348 - '</a>' .
349 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#menu-integration') . '" target="_blank" rel="noopener noreferrer">' .
350 - esc_html__('Open Docs', 'darkify') .
351 - '</a>',
352 - 'default' => '[darkify switch="1" light_mode_bg="#121116" dark_mode_bg="#ffffff" light_mode_color="#ffffff" dark_mode_color="#121116" border="0px" border_light_color="#121119" border_dark_color="#ffffff" border_radius="7px" switch_size="100"]'
196 + 'title' => esc_html__('Shortcode To Add On Menu', 'darkify'),
197 + 'title_help' => '<div class="darkify-info-label">' . __('You can change shortcode options value based on your pereference.', 'darkify') . '</div>',
198 + 'default' => '[darkify switch="1" width="60px" height="60px" icon_size="40px" light_mode_bg="#121116" dark_mode_bg="#ffffff" light_mode_color="#ffffff" dark_mode_color="#121116" border="0px" border_light_color="#121119" border_dark_color="#ffffff" border_radius="7px"]'
353 199 ),
354 200 array(
355 201 'id' => 'select_menu_position',
356 202 'type' => 'button_set',
357 - 'title' => esc_html__('Select Menu Position', 'darkify'),
358 - 'title_help' =>
359 - '<div class="darkify-info-label">' .
360 - esc_html__('Choose where the dark mode switch should appear in the menu.', 'darkify') .
361 - '</div>' .
362 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#advanced-control-options') . '" target="_blank" rel="noopener noreferrer">' .
363 - esc_html__('Live Demo', 'darkify') .
364 - '</a>' .
365 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'control/#menu-integration') . '" target="_blank" rel="noopener noreferrer">' .
366 - esc_html__('Open Docs', 'darkify') .
367 - '</a>',
368 -
369 - 'options' => array(
370 - 'after' => esc_html__('After', 'darkify'),
371 - 'before' => esc_html__('Before', 'darkify'),
203 + 'title' => esc_html__('Select Menu Position', 'darkify'),
204 + 'options' => array(
205 + 'after' => esc_html__('After', 'darkify'),
206 + 'before' => esc_html__('Before', 'darkify'),
372 207 ),
373 -
374 208 'default' => 'after',
375 209 ),
376 210 ),
377 211 'dependency' => array('enable_switch_in_menu', '==', 'true'),
@@ -383,99 +217,30 @@
383 217 array(
384 218 'title' => esc_html__('Admin', 'darkify'),
385 219 'icon' => 'icofont-dashboard-web',
386 220 'fields' => array(
221 +
387 222 array(
388 223 'id' => 'enable_admin_panel_dark_mode',
389 224 'type' => 'switcher',
390 - 'title' => esc_html__('Admin Panel Dark Mode', 'darkify'),
391 - 'title_help' =>
392 - '<div class="darkify-info-label">' .
393 - __('Enable dark mode in the WordPress admin dashboard.', 'darkify') .
394 - '</div>' .
395 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#admin') . '" target="_blank" rel="noopener noreferrer">' .
396 - esc_html__('Live Demo', 'darkify') .
397 - '</a>' .
398 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'controls/#admin-controls') . '" target="_blank" rel="noopener noreferrer">' .
399 - esc_html__('Open Docs', 'darkify') .
400 - '</a>',
401 - 'text_on' => esc_html__('Enabled', 'darkify'),
402 - 'text_off' => esc_html__('Disabled', 'darkify'),
403 - 'default' => false,
225 + 'title' => esc_html__('Admin Panel Dark Mode', 'darkify'),
226 + 'title_help' => '<div class="darkify-info-label">' . __('Switch to enable Dark Mode in WordPress Admin Panel.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/controls/" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/controls/#admin_controls" target="_blank">' . __('Open Docs', 'darkify') . '</a>',
227 + 'default' => false,
228 + 'text_on' => esc_html__('Enabled', 'darkify'),
229 + 'text_off' => esc_html__('Disabled', 'darkify'),
404 230 'text_width' => 100,
405 231 ),
406 232
407 233 array(
408 - 'id' => 'block_editor_dark_mode',
409 - 'type' => 'switcher',
410 - 'title' => esc_html__('Block Editor Dark Mode', 'darkify'),
411 - 'title_help' =>
412 - '<div class="darkify-info-label">' .
413 - __('Enable the dark mode switch in the block editor to toggle between dark and light mode.', 'darkify') .
414 - '</div>' .
415 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#admin') . '" target="_blank" rel="noopener noreferrer">' .
416 - esc_html__('Live Demo', 'darkify') .
417 - '</a>' .
418 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#admin') . '" target="_blank" rel="noopener noreferrer">' .
419 - esc_html__('Open Docs', 'darkify') .
420 - '</a>',
421 - 'text_on' => esc_html__('Enabled', 'darkify'),
422 - 'text_off' => esc_html__('Disabled', 'darkify'),
423 - 'default' => true,
424 - 'text_width' => 100,
425 - 'dependency' => array('enable_admin_panel_dark_mode', '==', 'true'),
426 - ),
427 - array(
428 - 'id' => 'classic_editor_dark_mode',
429 - 'type' => 'switcher',
430 - 'title' => esc_html__('Classic Editor Dark Mode', 'darkify'),
431 - 'title_help' =>
432 - '<div class="darkify-info-label">' .
433 - __('Enable the dark mode switch in the classic editor to toggle between dark and light modes.', 'darkify') .
434 - '</div>' .
435 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#admin') . '" target="_blank" rel="noopener noreferrer">' .
436 - esc_html__('Live Demo', 'darkify') .
437 - '</a>' .
438 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#admin') . '" target="_blank" rel="noopener noreferrer">' .
439 - esc_html__('Open Docs', 'darkify') .
440 - '</a>',
441 - 'text_on' => esc_html__('Enabled', 'darkify'),
442 - 'text_off' => esc_html__('Disabled', 'darkify'),
443 -
444 - 'default' => true,
445 - 'text_width' => 100,
446 - ),
447 -
448 - array(
449 234 'id' => 'disallowed_admin_pages',
450 235 'type' => 'textarea',
451 - 'title' => esc_html__('Disallowed Pages', 'darkify'),
452 - 'title_help' => '<div class="darkify-info-text">' .
453 - __('If an admin page URL looks like http://example.com/wp-admin/admin.php?page=darkify, then "darkify" is the page slug.', 'darkify') .
454 - '</div>' .
455 - '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'controls/#admin') . '" target="_blank" rel="noopener noreferrer">' .
456 - esc_html__('Live Demo', 'darkify') .
457 - '</a>' .
458 - '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'controls/#admin-controls') . '" target="_blank" rel="noopener noreferrer">' .
459 - esc_html__('Open Docs', 'darkify') .
460 - '</a>',
461 - 'placeholder' => esc_html__('Enter comma-separated page slugs. Example: darkify-dashboard, elementor', 'darkify'),
236 + 'title' => esc_html__('Disallowed Pages', 'darkify'),
237 + 'title_help' => '<div class="darkify-info-label">' . __('If the admin page URL is like http://example.com/wp-admin/admin.php?page=darkify then darkify is it\'s page slug.', 'darkify') . '</div>',
238 + 'placeholder' => esc_html__('Enter comma separated page slugs. Example: darkify-dashboard, elementor', 'darkify'),
462 239 'dependency' => array('enable_admin_panel_dark_mode', '==', 'true'),
463 240 'class' => 'only_pro'
464 241 ),
465 - array(
466 - 'id' => 'admin_custom_css',
467 - 'type' => 'code_editor',
468 - 'title' => esc_html__('Admin Dark Mode CSS', 'darkify'),
469 - 'title_help' =>
470 - '<div class="darkify-info-label">' .
471 - __('The CSS code will only be applied when admin dark mode is active.', 'darkify') .
472 - '</div>',
473 - 'settings' => array(
474 - 'theme' => 'mbo',
475 - 'mode' => 'css',
476 - ),
477 - ),
242 +
478 243 ),
479 244 ),
480 245 ),
481 246 ),