PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.3
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.3
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Views / admin / globalSettings / menu.php

menu.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.3, at app/Views/admin/globalSettings/menu.php

417 lines 29.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined('ABSPATH') or die;
4
5 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables in view files
6
7 use FluentForm\App\Helpers\Helper;
8 use FluentForm\Framework\Helpers\ArrayHelper;
9
10 ?>
11 <?php
12 do_action_deprecated(
13 'fluentform_global_menu',
14 [
15 ],
16 FLUENTFORM_FRAMEWORK_UPGRADE,
17 'fluentform/global_menu',
18 'Use fluentform/global_menu instead of fluentform_global_menu.'
19 );
20 do_action('fluentform/global_menu');
21 ?>
22
23 <div class="ff_form_wrap ff_global_setting_wrap">
24 <div class="global-overlay" id="global-overlay"></div>
25 <div class="ff_form_wrap_area">
26 <div class="ff_settings_wrapper ff_layout_section">
27 <?php
28 do_action_deprecated(
29 'fluentform_before_global_settings_wrapper',
30 [
31 ],
32 FLUENTFORM_FRAMEWORK_UPGRADE,
33 'fluentform/before_global_settings_wrapper',
34 'Use fluentform/before_global_settings_wrapper instead of fluentform_before_global_settings_wrapper.'
35 );
36 do_action('fluentform/before_global_settings_wrapper');
37 ?>
38 <div class="ff_settings_sidebar_wrap" id="ff_global_settings_sidebar">
39 <div class="ff_settings_sidebar ff_layout_section_sidebar">
40 <ul class="ff_settings_list ff_list_button">
41 <li class="ff_list_button_item has_sub_menu ">
42 <a
43 class="ff_list_button_link"
44 title="<?php echo esc_attr(__('General', 'fluentform')); ?>"
45 aria-label="<?php echo esc_attr(__('General', 'fluentform')); ?>"
46 href="#">
47 <i class="ff_settings_menu_icon ff-icon ff-icon-setting" aria-hidden="true"></i>
48 <span class="ff_settings_menu_label"><?php esc_html_e('General','fluentform'); ?></span>
49 </a>
50 <ul class="ff_list_submenu" >
51 <li >
52 <a class="ff-page-scroll"
53 data-section-id="#settings"
54 data-hash="settings"
55 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
56 'hash' => 'settings'
57 ])); ?>">
58 <?php esc_html_e('Layout', 'fluentform'); ?>
59 </a>
60 </li>
61 <li>
62 <a class="ff-page-scroll"
63 data-section-id="#email-summaries"
64 data-hash="settings"
65 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
66 'hash' => 'setting'
67 ])); ?>">
68 <?php esc_html_e('Email Summaries', 'fluentform'); ?>
69 </a>
70 </li>
71 <li>
72 <a class="ff-page-scroll"
73 data-section-id="#integration-failure-notification"
74 data-hash="settings"
75 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
76 'hash' => 'setting'
77 ])); ?>">
78 <?php esc_html_e('Integration Failure', 'fluentform'); ?>
79 </a>
80 </li>
81 <li>
82 <a class="ff-page-scroll"
83 data-section-id="#default-messages"
84 data-hash="settings"
85 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
86 'hash' => 'settings'
87 ])); ?>">
88 <?php esc_html_e('Validation Messages', 'fluentform'); ?>
89 </a>
90 </li>
91 <li>
92 <a class="ff-page-scroll"
93 data-section-id="#default-style-template"
94 data-hash="settings"
95 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
96 'hash' => 'settings'
97 ])); ?>">
98 <?php esc_html_e('Default Style Template', 'fluentform'); ?>
99 </a>
100 </li>
101 <li>
102 <a class="ff-page-scroll"
103 data-section-id="#miscellaneous"
104 data-hash="settings"
105 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
106 'hash' => 'setting'
107 ])); ?>">
108 <?php esc_html_e('Miscellaneous', 'fluentform'); ?>
109 </a>
110 </li>
111 </ul>
112 </li>
113
114 <?php if (ArrayHelper::exists($components, 'payment_settings')) : ?>
115 <?php if (Helper::isPaymentCompatible()) : ?>
116 <li class="ff_list_button_item has_sub_menu">
117 <a class="ff_list_button_link"
118 title="<?php echo esc_attr(ArrayHelper::get($components, 'payment_settings.title', '')); ?>"
119 aria-label="<?php echo esc_attr(ArrayHelper::get($components, 'payment_settings.title', '')); ?>"
120 href="#">
121 <i class="ff_settings_menu_icon ff-icon ff-icon-payment" aria-hidden="true"></i>
122 <span class="ff_settings_menu_label"><?php echo esc_html(ArrayHelper::get($components, 'payment_settings.title', '')); ?></span>
123 </a>
124 <?php if (ArrayHelper::get($components, 'payment_settings.sub_menu')) : ?>
125 <ul class="ff_list_submenu">
126 <?php $subMenus = ArrayHelper::get($components, 'payment_settings.sub_menu');
127 foreach ($subMenus as $subMenu): ?>
128 <li class="<?php echo esc_attr(ArrayHelper::get($subMenu, 'class','')); ?> ff_list_button_item">
129 <a
130 data-settings_key="payment_component"
131 data-component="payment_component"
132 data-hash="<?php echo esc_attr(ArrayHelper::get($subMenu, 'hash')) ?>"
133 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
134 'hash' => esc_attr(ArrayHelper::get($subMenu, 'hash')),
135 ])); ?>"
136 >
137 <?php echo esc_attr(ArrayHelper::get($subMenu, 'title', '')); ?>
138 </a>
139 </li>
140 <?php endforeach; ?>
141 </ul>
142 <?php endif ?>
143 </li>
144 <?php else : ?>
145 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('payment_settings', $currentComponent)); ?> ff_list_button_item has_sub_menu">
146 <a
147 class="ff_list_button_link ff-payment-settings-root"
148 data-hash="payment_settings"
149 title="<?php echo esc_attr(__('Payment', 'fluentform')); ?>"
150 aria-label="<?php echo esc_attr(__('Payment', 'fluentform')); ?>"
151 href="#">
152 <i class="ff_settings_menu_icon ff-icon ff-icon-payment" aria-hidden="true"></i>
153 <span class="ff_settings_menu_label"><?php esc_html_e('Payment', 'fluentform'); ?></span>
154 </a>
155 <?php if (ArrayHelper::get($components, 'payment_settings.sub_menu')) : ?>
156 <ul class="ff_list_submenu">
157 <?php
158 $subMenus = ArrayHelper::get($components, 'payment_settings.sub_menu');
159 foreach ($subMenus as $subMenu):
160 $baseUrl = Helper::makeMenuUrl('fluent_forms_settings', $subMenu);
161 $baseUrl .= ArrayHelper::get($subMenu, 'path');
162 ?>
163 <li>
164 <a data-settings_key="<?php echo esc_attr(ArrayHelper::get($subMenu,
165 'path')); ?>"
166 data-component="<?php echo esc_attr(ArrayHelper::get($subMenu, 'path',
167 '')); ?>"
168 data-hash="<?php echo esc_attr(ArrayHelper::get($subMenu, 'path',
169 '')); ?>"
170 href="<?php echo esc_url($baseUrl); ?>"
171 >
172 <?php echo esc_attr($subMenu['name']); ?>
173 </a>
174 </li>
175 <?php endforeach; ?>
176 </ul>
177 <?php endif ?>
178 </li>
179 <?php endif; ?>
180 <?php endif; ?>
181
182 <li class="ff_list_button_item has_sub_menu">
183 <a class="ff_list_button_link"
184 title="<?php echo esc_attr(__('Security', 'fluentform')); ?>"
185 aria-label="<?php echo esc_attr(__('Security', 'fluentform')); ?>"
186 href="#">
187 <i class="ff_settings_menu_icon ff-icon ff-icon-lock" aria-hidden="true"></i>
188 <span class="ff_settings_menu_label"><?php esc_html_e('Security', 'fluentform'); ?></span>
189 </a>
190 <ul class="ff_list_submenu">
191 <?php foreach ($components as $componentName => $component): ?>
192 <?php if (ArrayHelper::get($component, 'hash') == 're_captcha'
193 || ArrayHelper::get($component, 'hash') == 'h_captcha'
194 || ArrayHelper::get($component, 'hash') == 'turnstile'
195 || ArrayHelper::get($component, 'hash') == 'cleantalk'
196 ) : ?>
197
198 <li class="<?php echo esc_attr(Helper::getHtmlElementClass($component['hash'],
199 $currentComponent)); ?> ff_item_<?php echo esc_attr($componentName); ?>">
200 <a data-settings_key="<?php echo esc_attr(ArrayHelper::get($component,
201 'settings_key')); ?>"
202 data-component="<?php echo esc_attr(ArrayHelper::get($component, 'component',
203 '')); ?>"
204 data-hash="<?php echo esc_attr(ArrayHelper::get($component, 'hash', '')); ?>"
205 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings',
206 $component)); ?>"
207 >
208 <?php echo esc_attr($component['title']); ?>
209 </a>
210 </li>
211 <?php endif ?>
212 <?php endforeach; ?>
213 </ul>
214 </li>
215
216 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('managers', $currentComponent)); ?> ff_list_button_item">
217 <a
218 class="ff_list_button_link"
219 data-hash="managers"
220 title="<?php echo esc_attr(__('Permissions', 'fluentform')); ?>"
221 aria-label="<?php echo esc_attr(__('Permissions', 'fluentform')); ?>"
222 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
223 'hash' => 'permissions'
224 ])); ?>">
225 <i class="ff_settings_menu_icon ff-icon ff-icon-user" aria-hidden="true"></i>
226 <span class="ff_settings_menu_label"><?php esc_html_e('Permissions','fluentform'); ?></span>
227 </a>
228 </li>
229 <?php if ( ArrayHelper::get($components, 'admin_approval')) :?>
230
231 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('admin_approval', $currentComponent)); ?> ff_list_button_item">
232 <a
233 class="ff_list_button_link"
234 data-hash="admin_approval"
235 data-settings_key="ff_admin_approval"
236 data-component="general-integration-settings"
237 title="<?php echo esc_attr(__('Admin approval', 'fluentform')); ?>"
238 aria-label="<?php echo esc_attr(__('Admin approval', 'fluentform')); ?>"
239 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
240 'hash' => 'admin_approval'
241 ])); ?>">
242 <i class="ff_settings_menu_icon ff-icon ff-icon-checkmark-square" aria-hidden="true"></i>
243 <span class="ff_settings_menu_label"><?php esc_html_e('Admin approval', 'fluentform'); ?></span>
244 </a>
245 </li>
246 <?php endif; ?>
247 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('double_optin_settings', $currentComponent)); ?> ff_list_button_item">
248 <a
249 class="ff_list_button_link"
250 data-hash="double_optin_settings"
251 title="<?php echo esc_attr(__('Double Opt-in', 'fluentform')); ?>"
252 aria-label="<?php echo esc_attr(__('Double Opt-in', 'fluentform')); ?>"
253 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
254 'hash' => 'double_optin_settings'
255 ])); ?>">
256 <i class="ff_settings_menu_icon ff-icon ff-icon-email" aria-hidden="true"></i>
257 <span class="ff_settings_menu_label"><?php esc_html_e('Double Opt-in', 'fluentform'); ?></span>
258 </a>
259 </li>
260 <?php
261 if (ArrayHelper::exists($components, 'InventoryManager')) { ?>
262 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('inventory', $currentComponent)); ?> ff_list_button_item">
263 <a
264 class="ff_list_button_link"
265 data-hash="inventory_manager"
266 title="<?php echo esc_attr(__('Inventory Manager', 'fluentform')); ?>"
267 aria-label="<?php echo esc_attr(__('Inventory Manager', 'fluentform')); ?>"
268 href="<?php
269 echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
270 'hash' => 'inventory_manager'
271 ])); ?>">
272 <i class="ff_settings_menu_icon ff-icon ff-icon-layers" aria-hidden="true"></i>
273 <span class="ff_settings_menu_label"><?php esc_html_e('Inventory Manager', 'fluentform'); ?></span>
274 </a>
275 </li>
276 <?php } ?>
277
278 <li class="ff_list_button_item has_sub_menu">
279 <a class="ff_list_button_link"
280 title="<?php echo esc_attr(__('Configure Integrations', 'fluentform')); ?>"
281 aria-label="<?php echo esc_attr(__('Configure Integrations', 'fluentform')); ?>"
282 href="#">
283 <i class="ff_settings_menu_icon ff-icon ff-icon-puzzle" aria-hidden="true"></i>
284 <span class="ff_settings_menu_label"><?php esc_html_e('Configure Integrations', 'fluentform'); ?></span>
285 </a>
286 <ul class="ff_list_submenu">
287 <?php foreach ($components as $componentName => $component): ?>
288 <?php
289 if (ArrayHelper::get($component, 'hash') != 're_captcha'
290 && ArrayHelper::get($component, 'hash') != 'h_captcha'
291 && ArrayHelper::get($component, 'hash') != 'turnstile'
292 && ArrayHelper::get($component, 'hash') != 'cleantalk'
293 && $componentName != 'payment_settings'
294 && $componentName != 'license_page'
295 && ArrayHelper::get($component, 'hash') != 'admin_approval'
296 && ArrayHelper::get($component, 'hash') != 'inventory_manager'
297 )
298 : ?>
299
300 <li class="<?php echo esc_attr(Helper::getHtmlElementClass(ArrayHelper::get($component, 'hash'),
301 $currentComponent)); ?> ff_item_<?php echo esc_attr($componentName); ?>">
302 <a data-settings_key="<?php echo esc_attr(ArrayHelper::get($component,
303 'settings_key')); ?>"
304 data-component="<?php echo esc_attr(ArrayHelper::get($component, 'component',
305 '')); ?>"
306 data-hash="<?php echo esc_attr(ArrayHelper::get($component, 'hash', '')); ?>"
307 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings',
308 $component)); ?>"
309 >
310 <?php echo esc_attr($component['title']); ?>
311 </a>
312 </li>
313 <?php endif ?>
314 <?php endforeach; ?>
315 </ul>
316 </li>
317
318 <?php if ($licensePage = ArrayHelper::get($components, 'license_page', '')) : ?>
319 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('license_page', $currentComponent)); ?> ff_list_button_item">
320 <a
321 class="ff_list_button_link"
322 data-component="<?php echo esc_attr(ArrayHelper::get($licensePage, 'query.component', '')); ?>"
323 title="<?php echo esc_attr($licensePage['title']); ?>"
324 aria-label="<?php echo esc_attr($licensePage['title']); ?>"
325 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', $licensePage)); ?>"
326 >
327 <i class="ff_settings_menu_icon ff-icon ff-icon-handshake" aria-hidden="true"></i>
328 <span class="ff_settings_menu_label"><?php echo esc_attr($licensePage['title']); ?></span>
329 </a>
330 </li>
331 <?php endif ?>
332
333 <!-- Render Custom links -->
334 <?php if ($customLinks) : ?>
335 <?php foreach ($customLinks as $customLink): ?>
336 <?php if($subLinks = ArrayHelper::get($customLink, 'sub_links')) :?>
337 <li class="ff_list_button_item has_sub_menu">
338 <a class="ff_list_button_link"
339 title="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
340 aria-label="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
341 href="#">
342 <i class="ff_settings_menu_icon ff-icon <?php echo esc_attr(ArrayHelper::get($customLink, 'icon', 'ff-icon-link')); ?>" aria-hidden="true"></i>
343 <span class="ff_settings_menu_label"><?php echo esc_html(ArrayHelper::get($customLink, 'title', '')); ?></span>
344 </a>
345 <ul class="ff_list_submenu">
346 <?php foreach ($subLinks as $customSubLink): ?>
347 <li
348 class="<?php echo esc_attr(ArrayHelper::get($customSubLink, 'class', '')); ?> ff_list_button_item"
349 >
350 <a
351 data-hash="<?php echo esc_attr(ArrayHelper::get($customSubLink, 'hash', 'custom_component')) ?>"
352 data-settings_key="custom_component"
353 data-component="custom_component"
354 data-component_name="<?php echo esc_attr(ArrayHelper::get($customSubLink, 'component', '')); ?>"
355 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
356 'hash' => esc_attr(ArrayHelper::get($customSubLink, 'hash', 'custom_component')),
357 ])); ?>"
358 >
359 <?php echo esc_attr(ArrayHelper::get($customSubLink, 'title', '')); ?>
360 </a>
361 </li>
362 <?php endforeach; ?>
363 </ul>
364 </li>
365 <?php else: ?>
366 <li
367 class="<?php echo esc_attr(ArrayHelper::get($customLink, 'class', '')); ?> ff_list_button_item"
368 >
369 <a
370 class="ff_list_button_link"
371 data-hash="<?php echo esc_attr(ArrayHelper::get($customLink, 'hash', 'custom_component')) ?>"
372 data-settings_key="custom_component"
373 data-component="custom_component"
374 data-component_name="<?php echo esc_attr(ArrayHelper::get($customLink, 'component', '')); ?>"
375 title="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
376 aria-label="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
377 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
378 'hash' => esc_attr(ArrayHelper::get($customLink, 'hash', 'custom_component')),
379 ])); ?>"
380 >
381 <i class="ff_settings_menu_icon ff-icon <?php echo esc_attr(ArrayHelper::get($customLink, 'icon', 'ff-icon-link')); ?>" aria-hidden="true"></i>
382 <span class="ff_settings_menu_label"><?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?></span>
383 </a>
384 </li>
385 <?php endif ?>
386 <?php endforeach; ?>
387 <?php do_action('fluentform/global_settings_custom_component'); ?>
388 <?php endif ?>
389
390 </ul>
391 </div>
392 <button type="button" class="ff_sidebar_toggle" title="<?php echo esc_attr(__('Collapse settings menu', 'fluentform')); ?>" aria-label="<?php echo esc_attr(__('Collapse settings menu', 'fluentform')); ?>" aria-controls="ff_global_settings_sidebar" aria-expanded="true" data-collapse-label="<?php echo esc_attr(__('Collapse settings menu', 'fluentform')); ?>" data-expand-label="<?php echo esc_attr(__('Expand settings menu', 'fluentform')); ?>">
393 <i class="ff-icon ff-icon-arrow-right" aria-hidden="true"></i>
394 <span class="ff_sidebar_toggle_text"><?php echo esc_html(__('Collapse menu', 'fluentform')); ?></span>
395 </button>
396 </div>
397
398 <div class="ff_settings_container ff_layout_section_container" id="ff_settings_container">
399 <?php
400 do_action('fluentform/global_settings_component_' . $currentComponent);
401 ?>
402 </div>
403 <?php
404 do_action_deprecated(
405 'fluentform_after_global_settings_wrapper',
406 [
407 ],
408 FLUENTFORM_FRAMEWORK_UPGRADE,
409 'fluentform/after_global_settings_wrapper',
410 'Use fluentform/after_global_settings_wrapper instead of fluentform_after_global_settings_wrapper.'
411 );
412 do_action('fluentform/after_global_settings_wrapper');
413 ?>
414 </div>
415 </div>
416 </div>
417