Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/fluentform/app/Services/GlobalSearchService.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
namespace FluentForm\App\Services;
4
+
5
+
use FluentForm\App\Helpers\Helper;
6
+
use FluentForm\App\Models\Form;
7
+
8
+
class GlobalSearchService
9
+
{
10
+
11
+
public function get()
12
+
{
13
+
$links = [
14
+
[
15
+
"title" => 'Forms',
16
+
"icon" => '',
17
+
"path" => '?page=fluent_forms',
18
+
"tags" => ['all', 'forms', 'dashboard']
19
+
],
20
+
[
21
+
"title" => 'Forms -> New Form',
22
+
"icon" => '',
23
+
"path" => '?page=fluent_forms#add=1',
24
+
"tags" => ['new forms', 'add forms', 'create']
25
+
],
26
+
[
27
+
"title" => 'Entries',
28
+
"icon" => '',
29
+
"path" => '?page=fluent_forms_all_entries',
30
+
"tags" => ['all', 'entries']
31
+
],
32
+
[
33
+
"title" => 'Support',
34
+
"icon" => '',
35
+
"path" => '?page=fluent_forms_docs',
36
+
"tags" => ['support', 'modules', 'docs']
37
+
],
38
+
[
39
+
"title" => 'Integrations -> Modules',
40
+
"icon" => '',
41
+
"path" => '?page=fluent_forms_add_ons',
42
+
"tags" => ['all', 'integrations', 'modules']
43
+
],
44
+
[
45
+
"title" => 'Global Settings > General',
46
+
"icon" => '',
47
+
"path" => '?page=fluent_forms_settings#settings',
48
+
"tags" => [
49
+
'global',
50
+
'settings',
51
+
'general',
52
+
'layout',
53
+
'email summaries',
54
+
'failure',
55
+
'email notification',
56
+
'miscellaneous'
57
+
]
58
+
],
59
+
[
60
+
"title" => 'Global Settings > Security > rCaptcha',
61
+
"icon" => '',
62
+
"path" => '?page=fluent_forms_settings#re_captcha',
63
+
"tags" => ['global', 'security', 'recaptcha']
64
+
],
65
+
[
66
+
"title" => 'Global Settings > Security > hCaptcha',
67
+
"icon" => '',
68
+
"path" => '?page=fluent_forms_settings#h_captcha',
69
+
"tags" => ['global', 'security', 'hcaptcha']
70
+
],
71
+
[
72
+
"title" => 'Global Settings > Security > Turnstile',
73
+
"icon" => '',
74
+
"path" => '?page=fluent_forms_settings#turnstile',
75
+
"tags" => ['global', 'security', 'turnstile']
76
+
],
77
+
[
78
+
"title" => 'Global Settings > Managers',
79
+
"icon" => '',
80
+
"path" => '?page=fluent_forms_settings#managers',
81
+
"tags" => ['global', 'permissions', 'managers']
82
+
],
83
+
[
84
+
"title" => 'Global Settings > Configure Integration -> Mailchimp',
85
+
"icon" => '',
86
+
"path" => '?page=fluent_forms_settings#general-mailchimp-settings',
87
+
"tags" => ['global integrations', 'mailchimp']
88
+
],
89
+
[
90
+
"title" => 'Tools > Import forms',
91
+
"icon" => '',
92
+
"path" => '?page=fluent_forms_transfer#importforms',
93
+
"tags" => ['tools', 'migration', 'transfer', 'import']
94
+
],
95
+
[
96
+
"title" => 'Tools > Export Forms',
97
+
"icon" => '',
98
+
"path" => '?page=fluent_forms_transfer#exportsforms',
99
+
"tags" => ['tools', 'migration', 'transfer', 'export']
100
+
],
101
+
[
102
+
"title" => 'Tools > Migrator',
103
+
"icon" => '',
104
+
"path" => '?page=fluent_forms_transfer#migrator',
105
+
"tags" => ['tools', 'migration', 'transfer', 'migrator']
106
+
],
107
+
[
108
+
"title" => 'Tools > Activity Logs',
109
+
"icon" => '',
110
+
"path" => '?page=fluent_forms_transfer#activitylogs',
111
+
"tags" => ['tools', 'activity logs']
112
+
],
113
+
[
114
+
"title" => 'Tools > API Logs',
115
+
"icon" => '',
116
+
"path" => '?page=fluent_forms_transfer#apilogs',
117
+
"tags" => ['tools', 'api logs']
118
+
],
119
+
[
120
+
"title" => 'Payments',
121
+
"icon" => '',
122
+
"path" => '?page=fluent_forms_payment_entries',
123
+
"tags" => ['all', 'payments', 'entries']
124
+
],
125
+
[
126
+
"title" => 'Global Settings > Payment > Settings',
127
+
"icon" => '',
128
+
"path" => '?page=fluent_forms_settings' . (Helper::isPaymentCompatible() ? '#payments/general_settings' : '&component=payment_settings%2F#/'),
129
+
"tags" => ['global', 'settings', 'payment']
130
+
],
131
+
[
132
+
"title" => 'Global Settings > Payment > Payment Methods',
133
+
"icon" => '',
134
+
"path" => '?page=fluent_forms_settings' . (Helper::isPaymentCompatible() ? '#payments/payment_methods' : '&component=payment_settings%2F#/payment_methods'),
135
+
"tags" => ['global', 'settings', 'payment', 'method', 'stripe']
136
+
],
137
+
];
138
+
139
+
if (Helper::hasPro()) {
140
+
$links = array_merge($links, [
141
+
[
142
+
"title" => 'Global Settings > Double Opt-in',
143
+
"icon" => '',
144
+
"path" => '?page=fluent_forms_settings#double_optin_settings',
145
+
"tags" => ['global', 'security', 'double opt-in', 'optin']
146
+
],
147
+
[
148
+
"title" => 'Global Settings > Payment > Coupons',
149
+
"icon" => '',
150
+
"path" => '?page=fluent_forms_settings' . (Helper::isPaymentCompatible() ? '#payments/coupons' : '&component=payment_settings%2F#/coupons'),
151
+
"tags" => ['global', 'settings', 'payment', 'coupons']
152
+
],
153
+
[
154
+
"title" => 'Global Settings > License',
155
+
"icon" => '',
156
+
"path" => '?page=fluent_forms_settings&component=license_page',
157
+
"tags" => ['global', 'license']
158
+
],
159
+
[
160
+
"title" => 'Global Settings > Configure Integration -> Google Map Integration',
161
+
"icon" => '',
162
+
"path" => '?page=fluent_forms_settings#google_maps_autocomplete',
163
+
"tags" => ['global', 'integrations', 'google map integration']
164
+
],
165
+
[
166
+
"title" => 'Global Settings > Configure Integration -> Activecampaign',
167
+
"icon" => '',
168
+
"path" => '?page=fluent_forms_settings#general-activecampaign-settings',
169
+
"tags" => ['global integrations', 'activecampaign']
170
+
],
171
+
[
172
+
"title" => 'Global Settings > Configure Integration -> Campaign Monitor',
173
+
"icon" => '',
174
+
"path" => '?page=fluent_forms_settings#general-campaign_monitor-settings',
175
+
"tags" => ['global integrations', 'campaign monitor']
176
+
],
177
+
[
178
+
"title" => 'Global Settings > Configure Integration -> Constatant Contact',
179
+
"icon" => '',
180
+
"path" => '?page=fluent_forms_settings#general-constatantcontact-settings',
181
+
"tags" => ['global integrations', 'constatantcontact', 'constatant contact']
182
+
],
183
+
[
184
+
"title" => 'Global Settings > Configure Integration -> ConvertKit',
185
+
"icon" => '',
186
+
"path" => '?page=fluent_forms_settings#general-convertkit-settings',
187
+
"tags" => ['global integrations', 'convertkit']
188
+
],
189
+
[
190
+
"title" => 'Global Settings > Configure Integration -> GetResponse',
191
+
"icon" => '',
192
+
"path" => '?page=fluent_forms_settings#general-getresponse-settings',
193
+
"tags" => ['global integrations', 'getresponse']
194
+
],
195
+
[
196
+
"title" => 'Global Settings > Configure Integration -> Hubspot',
197
+
"icon" => '',
198
+
"path" => '?page=fluent_forms_settings#general-hubspot-settings',
199
+
"tags" => ['global integrations', 'hubspot']
200
+
],
201
+
[
202
+
"title" => 'Global Settings > Configure Integration -> iContact',
203
+
"icon" => '',
204
+
"path" => '?page=fluent_forms_settings#general-icontact-settings',
205
+
"tags" => ['global integrations', 'icontact']
206
+
],
207
+
[
208
+
"title" => 'Global Settings > Configure Integration -> MooSend',
209
+
"icon" => '',
210
+
"path" => '?page=fluent_forms_settings#general-moosend-settings',
211
+
"tags" => ['global integrations', 'moosend']
212
+
],
213
+
[
214
+
"title" => 'Global Settings > Configure Integration -> Platformly',
215
+
"icon" => '',
216
+
"path" => '?page=fluent_forms_settings#general-platformly-settings',
217
+
"tags" => ['global integrations', 'platformly']
218
+
],
219
+
[
220
+
"title" => 'Global Settings > Configure Integration -> SendFox',
221
+
"icon" => '',
222
+
"path" => '?page=fluent_forms_settings#general-sendfox-settings',
223
+
"tags" => ['global integrations', 'sendfox']
224
+
],
225
+
[
226
+
"title" => 'Global Settings > Configure Integration -> MailerLite',
227
+
"icon" => '',
228
+
"path" => '?page=fluent_forms_settings#general-mailerlite-settings',
229
+
"tags" => ['global integrations', 'mailerlite']
230
+
],
231
+
[
232
+
"title" => 'Global Settings > Configure Integration -> MooSend',
233
+
"icon" => '',
234
+
"path" => '?page=fluent_forms_settings#general-moosend-settings',
235
+
"tags" => ['global integrations', 'moosend']
236
+
],
237
+
[
238
+
"title" => 'Global Settings > Configure Integration -> Twilio',
239
+
"icon" => '',
240
+
"path" => '?page=fluent_forms_settings#general-sms_notification-settings',
241
+
"tags" => ['global integrations', 'sms notification', 'twilio']
242
+
],
243
+
[
244
+
"title" => 'Global Settings > Configure Integration -> GetGist',
245
+
"icon" => '',
246
+
"path" => '?page=fluent_forms_settings#general-getgist-settings',
247
+
"tags" => ['global integrations', 'getgist']
248
+
],
249
+
[
250
+
"title" => 'Global Settings > Configure Integration -> Google Sheet',
251
+
"icon" => '',
252
+
"path" => '?page=fluent_forms_settings#general-google_sheet-settings',
253
+
"tags" => ['global integrations', 'google sheet']
254
+
],
255
+
[
256
+
"title" => 'Global Settings > Configure Integration -> Trello',
257
+
"icon" => '',
258
+
"path" => '?page=fluent_forms_settings#general-trello-settings',
259
+
"tags" => ['global integrations', 'trello']
260
+
],
261
+
[
262
+
"title" => 'Global Settings > Configure Integration -> Drip',
263
+
"icon" => '',
264
+
"path" => '?page=fluent_forms_settings#general-drip-settings',
265
+
"tags" => ['global integrations', 'drip']
266
+
],
267
+
[
268
+
"title" => 'Global Settings > Configure Integration -> Brevo (formerly SendInBlue)',
269
+
"icon" => '',
270
+
"path" => '?page=fluent_forms_settings#general-sendinblue-settings',
271
+
"tags" => ['global integrations', 'sendinblue', 'brevo']
272
+
],
273
+
[
274
+
"title" => 'Global Settings > Configure Integration -> Automizy',
275
+
"icon" => '',
276
+
"path" => '?page=fluent_forms_settings#general-automizy-settings',
277
+
"tags" => ['global integrations', 'automizy']
278
+
],
279
+
[
280
+
"title" => 'Global Settings > Configure Integration -> Telegram Messenger',
281
+
"icon" => '',
282
+
"path" => '?page=fluent_forms_settings#general-telegram-settings',
283
+
"tags" => ['global integrations', 'telegram messenger']
284
+
],
285
+
[
286
+
"title" => 'Global Settings > Configure Integration -> Salesflare',
287
+
"icon" => '',
288
+
"path" => '?page=fluent_forms_settings#general-salesflare-settings',
289
+
"tags" => ['global integrations', 'salesflare']
290
+
],
291
+
[
292
+
"title" => 'Global Settings > Configure Integration -> CleverReach',
293
+
"icon" => '',
294
+
"path" => '?page=fluent_forms_settings#general-cleverreach-settings',
295
+
"tags" => ['global integrations', 'cleverreach']
296
+
],
297
+
[
298
+
"title" => 'Global Settings > Configure Integration -> ClickSend',
299
+
"icon" => '',
300
+
"path" => '?page=fluent_forms_settings#general-clicksend_sms_notification-settings',
301
+
"tags" => ['global integrations', 'clicksend', 'sms_notification']
302
+
],
303
+
[
304
+
"title" => 'Global Settings > Configure Integration -> Zoho CRM',
305
+
"icon" => '',
306
+
"path" => '?page=fluent_forms_settings#general-zohocrm-settings',
307
+
"tags" => ['global integrations', 'zoho crm']
308
+
],
309
+
[
310
+
"title" => 'Global Settings > Configure Integration -> Pipedrive',
311
+
"icon" => '',
312
+
"path" => '?page=fluent_forms_settings#general-pipedrive-settings',
313
+
"tags" => ['global integrations', 'pipedrive']
314
+
],
315
+
[
316
+
"title" => 'Global Settings > Configure Integration -> Salesforce',
317
+
"icon" => '',
318
+
"path" => '?page=fluent_forms_settings#general-salesforce-settings',
319
+
"tags" => ['global integrations', 'salesforce']
320
+
],
321
+
[
322
+
"title" => 'Global Settings > Configure Integration -> Amocrm',
323
+
"icon" => '',
324
+
"path" => '?page=fluent_forms_settings#general-amocrm-settings',
325
+
"tags" => ['global integrations', 'amocrm']
326
+
],
327
+
[
328
+
"title" => 'Global Settings > Configure Integration -> OnePageCrm',
329
+
"icon" => '',
330
+
"path" => '?page=fluent_forms_settings#general-onepagecrm-settings',
331
+
"tags" => ['global integrations', 'onepagecrm']
332
+
],
333
+
[
334
+
"title" => 'Global Settings > Configure Integration -> Airtable',
335
+
"icon" => '',
336
+
"path" => '?page=fluent_forms_settings#general-airtable-settings',
337
+
"tags" => ['global integrations', 'airtable']
338
+
],
339
+
[
340
+
"title" => 'Global Settings > Configure Integration -> Mailjet',
341
+
"icon" => '',
342
+
"path" => '?page=fluent_forms_settings#general-mailjet-settings',
343
+
"tags" => ['global integrations', 'mailjet']
344
+
],
345
+
[
346
+
"title" => 'Global Settings > Configure Integration -> Insightly',
347
+
"icon" => '',
348
+
"path" => '?page=fluent_forms_settings#general-insightly-settings',
349
+
"tags" => ['global integrations', 'insightly']
350
+
]
351
+
]);
352
+
}
353
+
354
+
if (defined('FLUENTFORM_PDF_VERSION')) {
355
+
$links = array_merge($links, [
356
+
[
357
+
"title" => 'Global Settings > Configure Integration -> PDF Settings',
358
+
"icon" => '',
359
+
"path" => '?page=fluent_forms_settings#pdf_settings',
360
+
"tags" => ['global integrations', 'pdf settings']
361
+
],
362
+
[
363
+
"title" => 'Integrations -> Fluent Forms PDF',
364
+
"icon" => '',
365
+
"path" => '?page=fluent_forms_add_ons&sub_page=fluentform_pdf',
366
+
"tags" => ['pdf', 'modules']
367
+
]
368
+
]);
369
+
}
370
+
371
+
372
+
$forms = Form::where('status', 'published')
373
+
->select(['id', 'title', 'type'])->get();
374
+
if ($forms) {
375
+
foreach ($forms as $form) {
376
+
$formSpecificLinks = [
377
+
[
378
+
"title" => "Forms > $form->title > Editor",
379
+
"icon" => '',
380
+
"path" => "?page=fluent_forms&form_id=$form->id&route=editor",
381
+
"tags" => ['editor', "$form->id", $form->title]
382
+
],
383
+
[
384
+
"title" => "Forms > $form->title > Entries",
385
+
"icon" => '',
386
+
"path" => "?page=fluent_forms&form_id=$form->id&route=entries#/?sort_by=DESC&type=&page=1",
387
+
"tags" => ['entries', "$form->id", $form->title]
388
+
],
389
+
[
390
+
"title" => "Forms > $form->title > Entries > Visual Reports",
391
+
"icon" => '',
392
+
"path" => "?page=fluent_forms&form_id=$form->id&route=entries#/visual_reports",
393
+
"tags" => ['entries', 'visual reports', "$form->id", $form->title]
394
+
],
395
+
[
396
+
"title" => "Forms > $form->title > Settings & Integrations > Settings",
397
+
"icon" => '',
398
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/",
399
+
"tags" => ['settings and integrations', "$form->id", $form->title]
400
+
],
401
+
[
402
+
"title" => "Forms > $form->title > Settings & Integrations > Slack",
403
+
"icon" => '',
404
+
"path" => "?page=fluent_forms&form_id=2&route=settings&sub_route=form_settings#/slack",
405
+
"tags" => ['slack', "$form->id", $form->title]
406
+
],
407
+
[
408
+
"title" => "Forms > $form->title > Settings & Integrations > Custom CSS/JS",
409
+
"icon" => '',
410
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/custom-css-js",
411
+
"tags" => ['custom', 'CSS/JS', 'css javascript', "$form->id", $form->title]
412
+
],
413
+
[
414
+
"title" => "Forms > $form->title > Settings & Integrations > Configure Integrations",
415
+
"icon" => '',
416
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/all-integrations",
417
+
"tags" => ['configure integrations', "$form->id", $form->title]
418
+
],
419
+
[
420
+
"title" => "Forms > $form->title > Preview",
421
+
"icon" => '',
422
+
"type" => 'preview',
423
+
"path" => "?fluent_forms_pages=1&design_mode=1&preview_id=$form->id#ff_preview",
424
+
"tags" => ['preview ', "$form->id", $form->title]
425
+
]
426
+
];
427
+
if (defined('FLUENTFORMPRO')) {
428
+
$formSpecificLinks = array_merge($formSpecificLinks, [
429
+
[
430
+
"title" => "Forms > $form->title > Settings & Integrations > Landing Page",
431
+
"icon" => '',
432
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/landing_pages",
433
+
"tags" => ['landing pages', "$form->id", $form->title]
434
+
],
435
+
[
436
+
"title" => "Forms > $form->title > Settings & Integrations > Conditional Confirmations",
437
+
"icon" => '',
438
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/conditional-confirmations",
439
+
"tags" => ["conditional confirmations", "$form->id", $form->title]
440
+
],
441
+
[
442
+
"title" => "Forms > $form->title > Settings & Integrations > Email Notifications",
443
+
"icon" => '',
444
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/email-settings",
445
+
"tags" => ["email notifications", "$form->id", $form->title]
446
+
],
447
+
[
448
+
"title" => "Forms > $form->title > Settings & Integrations > Zapier",
449
+
"icon" => '',
450
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/zapier",
451
+
"tags" => ['zapier', "$form->id", $form->title]
452
+
],
453
+
[
454
+
"title" => "Forms > $form->title > Settings & Integrations > Webhook",
455
+
"icon" => '',
456
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/webhook",
457
+
"tags" => ['webhook', "$form->id", $form->title]
458
+
],
459
+
[
460
+
"title" => "Forms > $form->title > Settings & Integrations > Quiz Settings",
461
+
"icon" => '',
462
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/quiz_settings",
463
+
"tags" => ["quiz", "$form->id", $form->title]
464
+
]
465
+
]);
466
+
}
467
+
if (defined('FLUENTFORM_PDF_VERSION')) {
468
+
$formSpecificLinks[] = [
469
+
"title" => "Forms > $form->title > Settings & Integrations > PDF Feeds",
470
+
"icon" => '',
471
+
"path" => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/pdf-feeds",
472
+
"tags" => ['pdf feeds', "$form->id", $form->title]
473
+
];
474
+
}
475
+
476
+
if (defined('FLUENTFORMPRO') && 'post' === $form->type) {
477
+
$formSpecificLinks[] = [
478
+
"title" => "Forms > $form->title > Settings & Integrations > Post Feeds",
479
+
"icon" => '',
480
+
"path" => "?page=fluent_forms&form_id=104&route=settings&sub_route=form_settings#/post-feeds",
481
+
"tags" => ['post feeds', "$form->id", $form->title]
482
+
];
483
+
}
484
+
if (Helper::isConversionForm($form->id)) {
485
+
$formSpecificLinks[] = [
486
+
"title" => "Forms > $form->title > Design",
487
+
"icon" => '',
488
+
"path" => "?page=fluent_forms&form_id=$form->id&route=conversational_design",
489
+
"tags" => ['conversational design', "$form->id", $form->title]
490
+
];
491
+
$formSpecificLinks[] = [
492
+
"title" => "Forms > $form->title > Conversational Preview",
493
+
"icon" => '',
494
+
"type" => 'preview',
495
+
"path" => "?fluent-form=$form->id",
496
+
"tags" => ['preview', 'conversational', "$form->id", $form->title]
497
+
];
498
+
}
499
+
$links = array_merge($links, $formSpecificLinks);
500
+
}
501
+
}
502
+
return [
503
+
"links" => apply_filters('fluentform/global_search_links', $links),
504
+
"admin_url" => get_admin_url(null, 'admin.php'),
505
+
"site_url" => site_url(),
506
+
];
507
+
}
508
+
}
509
+