PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
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.14, at app/Views/admin/globalSettings/menu.php

437 lines 30.4 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 // Every control on this card (the enable toggle, the
262 // adapter install) requires manage_options, so showing it
263 // to a settings manager would only offer them a switch
264 // that always errors.
265 if (current_user_can('manage_options')) { ?>
266 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('mcp_settings', $currentComponent)); ?> ff_list_button_item">
267 <a
268 class="ff_list_button_link"
269 data-hash="mcp_settings"
270 title="<?php echo esc_attr(__('MCP for AI Agents', 'fluentform')); ?>"
271 aria-label="<?php echo esc_attr(__('MCP for AI Agents', 'fluentform')); ?>"
272 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
273 'hash' => 'mcp_settings'
274 ])); ?>">
275 <i class="ff_settings_menu_icon ff-icon ff-icon-code" aria-hidden="true"></i>
276 <span class="ff_settings_menu_label"><?php esc_html_e('MCP for AI Agents', 'fluentform'); ?></span>
277 </a>
278 </li>
279 <?php } ?>
280 <?php
281 if (ArrayHelper::exists($components, 'InventoryManager')) { ?>
282 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('inventory', $currentComponent)); ?> ff_list_button_item">
283 <a
284 class="ff_list_button_link"
285 data-hash="inventory_manager"
286 title="<?php echo esc_attr(__('Inventory Manager', 'fluentform')); ?>"
287 aria-label="<?php echo esc_attr(__('Inventory Manager', 'fluentform')); ?>"
288 href="<?php
289 echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
290 'hash' => 'inventory_manager'
291 ])); ?>">
292 <i class="ff_settings_menu_icon ff-icon ff-icon-layers" aria-hidden="true"></i>
293 <span class="ff_settings_menu_label"><?php esc_html_e('Inventory Manager', 'fluentform'); ?></span>
294 </a>
295 </li>
296 <?php } ?>
297
298 <li class="ff_list_button_item has_sub_menu">
299 <a class="ff_list_button_link"
300 title="<?php echo esc_attr(__('Configure Integrations', 'fluentform')); ?>"
301 aria-label="<?php echo esc_attr(__('Configure Integrations', 'fluentform')); ?>"
302 href="#">
303 <i class="ff_settings_menu_icon ff-icon ff-icon-puzzle" aria-hidden="true"></i>
304 <span class="ff_settings_menu_label"><?php esc_html_e('Configure Integrations', 'fluentform'); ?></span>
305 </a>
306 <ul class="ff_list_submenu">
307 <?php foreach ($components as $componentName => $component): ?>
308 <?php
309 if (ArrayHelper::get($component, 'hash') != 're_captcha'
310 && ArrayHelper::get($component, 'hash') != 'h_captcha'
311 && ArrayHelper::get($component, 'hash') != 'turnstile'
312 && ArrayHelper::get($component, 'hash') != 'cleantalk'
313 && $componentName != 'payment_settings'
314 && $componentName != 'license_page'
315 && ArrayHelper::get($component, 'hash') != 'admin_approval'
316 && ArrayHelper::get($component, 'hash') != 'inventory_manager'
317 )
318 : ?>
319
320 <li class="<?php echo esc_attr(Helper::getHtmlElementClass(ArrayHelper::get($component, 'hash'),
321 $currentComponent)); ?> ff_item_<?php echo esc_attr($componentName); ?>">
322 <a data-settings_key="<?php echo esc_attr(ArrayHelper::get($component,
323 'settings_key')); ?>"
324 data-component="<?php echo esc_attr(ArrayHelper::get($component, 'component',
325 '')); ?>"
326 data-hash="<?php echo esc_attr(ArrayHelper::get($component, 'hash', '')); ?>"
327 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings',
328 $component)); ?>"
329 >
330 <?php echo esc_attr($component['title']); ?>
331 </a>
332 </li>
333 <?php endif ?>
334 <?php endforeach; ?>
335 </ul>
336 </li>
337
338 <?php if ($licensePage = ArrayHelper::get($components, 'license_page', '')) : ?>
339 <li class="<?php echo esc_attr(Helper::getHtmlElementClass('license_page', $currentComponent)); ?> ff_list_button_item">
340 <a
341 class="ff_list_button_link"
342 data-component="<?php echo esc_attr(ArrayHelper::get($licensePage, 'query.component', '')); ?>"
343 title="<?php echo esc_attr($licensePage['title']); ?>"
344 aria-label="<?php echo esc_attr($licensePage['title']); ?>"
345 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', $licensePage)); ?>"
346 >
347 <i class="ff_settings_menu_icon ff-icon ff-icon-handshake" aria-hidden="true"></i>
348 <span class="ff_settings_menu_label"><?php echo esc_attr($licensePage['title']); ?></span>
349 </a>
350 </li>
351 <?php endif ?>
352
353 <!-- Render Custom links -->
354 <?php if ($customLinks) : ?>
355 <?php foreach ($customLinks as $customLink): ?>
356 <?php if($subLinks = ArrayHelper::get($customLink, 'sub_links')) :?>
357 <li class="ff_list_button_item has_sub_menu">
358 <a class="ff_list_button_link"
359 title="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
360 aria-label="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
361 href="#">
362 <i class="ff_settings_menu_icon ff-icon <?php echo esc_attr(ArrayHelper::get($customLink, 'icon', 'ff-icon-link')); ?>" aria-hidden="true"></i>
363 <span class="ff_settings_menu_label"><?php echo esc_html(ArrayHelper::get($customLink, 'title', '')); ?></span>
364 </a>
365 <ul class="ff_list_submenu">
366 <?php foreach ($subLinks as $customSubLink): ?>
367 <li
368 class="<?php echo esc_attr(ArrayHelper::get($customSubLink, 'class', '')); ?> ff_list_button_item"
369 >
370 <a
371 data-hash="<?php echo esc_attr(ArrayHelper::get($customSubLink, 'hash', 'custom_component')) ?>"
372 data-settings_key="custom_component"
373 data-component="custom_component"
374 data-component_name="<?php echo esc_attr(ArrayHelper::get($customSubLink, 'component', '')); ?>"
375 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
376 'hash' => esc_attr(ArrayHelper::get($customSubLink, 'hash', 'custom_component')),
377 ])); ?>"
378 >
379 <?php echo esc_attr(ArrayHelper::get($customSubLink, 'title', '')); ?>
380 </a>
381 </li>
382 <?php endforeach; ?>
383 </ul>
384 </li>
385 <?php else: ?>
386 <li
387 class="<?php echo esc_attr(ArrayHelper::get($customLink, 'class', '')); ?> ff_list_button_item"
388 >
389 <a
390 class="ff_list_button_link"
391 data-hash="<?php echo esc_attr(ArrayHelper::get($customLink, 'hash', 'custom_component')) ?>"
392 data-settings_key="custom_component"
393 data-component="custom_component"
394 data-component_name="<?php echo esc_attr(ArrayHelper::get($customLink, 'component', '')); ?>"
395 title="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
396 aria-label="<?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?>"
397 href="<?php echo esc_url(Helper::makeMenuUrl('fluent_forms_settings', [
398 'hash' => esc_attr(ArrayHelper::get($customLink, 'hash', 'custom_component')),
399 ])); ?>"
400 >
401 <i class="ff_settings_menu_icon ff-icon <?php echo esc_attr(ArrayHelper::get($customLink, 'icon', 'ff-icon-link')); ?>" aria-hidden="true"></i>
402 <span class="ff_settings_menu_label"><?php echo esc_attr(ArrayHelper::get($customLink, 'title', '')); ?></span>
403 </a>
404 </li>
405 <?php endif ?>
406 <?php endforeach; ?>
407 <?php do_action('fluentform/global_settings_custom_component'); ?>
408 <?php endif ?>
409
410 </ul>
411 </div>
412 <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')); ?>">
413 <i class="ff-icon ff-icon-arrow-right" aria-hidden="true"></i>
414 <span class="ff_sidebar_toggle_text"><?php echo esc_html(__('Collapse menu', 'fluentform')); ?></span>
415 </button>
416 </div>
417
418 <div class="ff_settings_container ff_layout_section_container" id="ff_settings_container">
419 <?php
420 do_action('fluentform/global_settings_component_' . $currentComponent);
421 ?>
422 </div>
423 <?php
424 do_action_deprecated(
425 'fluentform_after_global_settings_wrapper',
426 [
427 ],
428 FLUENTFORM_FRAMEWORK_UPGRADE,
429 'fluentform/after_global_settings_wrapper',
430 'Use fluentform/after_global_settings_wrapper instead of fluentform_after_global_settings_wrapper.'
431 );
432 do_action('fluentform/after_global_settings_wrapper');
433 ?>
434 </div>
435 </div>
436 </div>
437