PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.12
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.12
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 / Modules / AddOnModule.php

AddOnModule.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.12, at app/Modules/AddOnModule.php

614 lines 30.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules;
4
5 use FluentForm\App\Helpers\Helper;
6 use FluentForm\App\Modules\Registerer\TranslationString;
7
8 class AddOnModule
9 {
10 /**
11 * The number of days we'll cached the add-ons got from remote server.
12 *
13 * @var integer
14 */
15 protected $cacheDays = 1;
16
17 /**
18 * The URL to fetch the add-ons
19 *
20 * @var string
21 */
22 protected $addOnsFetchUrl = 'https://wpmanageninja.com/add-ons.json';
23
24 /**
25 * Render the add-ons list page.
26 */
27 public function render()
28 {
29 $extraMenus = [];
30
31 $extraMenus = apply_filters_deprecated(
32 'fluentform_addons_extra_menu',
33 [
34 $extraMenus,
35 ],
36 FLUENTFORM_FRAMEWORK_UPGRADE,
37 'fluentform/addons_extra_menu',
38 'Use fluentform/addons_extra_menu instead of fluentform_addons_extra_menu'
39 );
40
41 // Add suggested plugins tab
42 $extraMenus['suggested_plugins'] = __('Suggested Plugins', 'fluentform');
43
44 $extraMenus = apply_filters('fluentform/addons_extra_menu', $extraMenus);
45
46 $current_menu_item = 'fluentform_add_ons';
47
48 $subPage = wpFluentForm('request')->get('sub_page');
49
50 if ($subPage) {
51 $current_menu_item = sanitize_key($subPage);
52 }
53
54 wpFluentForm('view')->render('admin.addons.index', [
55 'hasPro' => defined('FLUENTFORMPRO'),
56 'menus' => $extraMenus,
57 'base_url' => admin_url('admin.php?page=fluent_forms_add_ons'),
58 'current_menu_item' => $current_menu_item,
59 ]);
60 }
61
62 /**
63 * Show the add-ons list.
64 */
65 public function showFluentAddOns()
66 {
67 wp_enqueue_script('fluentform-modules');
68
69 $addOns = apply_filters_deprecated(
70 'fluentform_global_addons',
71 [
72 [],
73 ],
74 FLUENTFORM_FRAMEWORK_UPGRADE,
75 'fluentform/global_addons',
76 'Use fluentform/global_addons instead of fluentform_global_addons'
77 );
78 $addOns = apply_filters('fluentform/global_addons', $addOns);
79
80 $addOns['slack'] = [
81 'title' => __('Slack', 'fluentform'),
82 'description' => __('Get realtime notification in slack channel when a new submission will be added.', 'fluentform'),
83 'logo' => fluentFormMix('img/integrations/slack.png'),
84 'enabled' => Helper::isSlackEnabled() ? 'yes' : 'no',
85 'config_url' => '',
86 'category' => 'crm',
87 ];
88
89 if (!defined('FLUENTFORMPRO')) {
90 $addOns = array_merge($addOns, $this->getPremiumAddOns());
91 }
92
93 wp_localize_script('fluentform-modules', 'fluent_addon_modules', [
94 'addons' => $addOns,
95 'has_pro' => defined('FLUENTFORMPRO'),
96 'addOnModule_str' => TranslationString::getAddOnModuleI18n(),
97 ]);
98
99 wpFluentForm('view')->render('admin.addons.list', []);
100 }
101
102 public function getPremiumAddOns()
103 {
104 $purchaseUrl = fluentform_upgrade_url();
105 $addOns = [
106 'paypal' => [
107 'title' => __('PayPal', 'fluentform'),
108 'description' => __('Accept Payments via paypal as a part of your form submission', 'fluentform'),
109 'logo' => fluentFormMix('img/integrations/paypal.png'),
110 'enabled' => 'no',
111 'purchase_url' => $purchaseUrl,
112 'category' => 'payment',
113 ],
114 'stripe' => [
115 'title' => __('Stripe', 'fluentform'),
116 'description' => __('Accept Payments via stripe as a part of your form submission', 'fluentform'),
117 'logo' => fluentFormMix('img/integrations/stripe.png'),
118 'enabled' => 'no',
119 'purchase_url' => $purchaseUrl,
120 'category' => 'payment',
121 ],
122 'UserRegistration' => [
123 'title' => __('User Registration', 'fluentform'),
124 'description' => __('Create WordPress user when when a form is submitted', 'fluentform'),
125 'logo' => fluentFormMix('img/integrations/user_registration.png'),
126 'enabled' => 'no',
127 'purchase_url' => $purchaseUrl,
128 'category' => 'wp_core',
129 ],
130 'PostFeeds' => [
131 'title' => __('Advanced Post/CPT Creation', 'fluentform'),
132 'description' => __('Create post/any cpt on form submission. It will enable many new features including dedicated post fields.', 'fluentform'),
133 'logo' => fluentFormMix('img/integrations/post-creation.png'),
134 'enabled' => 'no',
135 'purchase_url' => $purchaseUrl,
136 'category' => 'wp_core',
137 ],
138 'sharePages' => [
139 'title' => __('Landing Pages', 'fluentform'),
140 'description' => __('Create completely custom "distraction-free" form landing pages to boost conversions', 'fluentform'),
141 'logo' => fluentFormMix('img/integrations/landing_pages.png'),
142 'enabled' => 'no',
143 'purchase_url' => $purchaseUrl,
144 'category' => 'wp_core',
145 ],
146 'webhook' => [
147 'title' => __('WebHooks', 'fluentform'),
148 'description' => __('Broadcast your Fluent Forms Submission to any web api endpoint with the powerful webhook module.', 'fluentform'),
149 'logo' => fluentFormMix('img/integrations/webhook.png'),
150 'enabled' => 'no',
151 'purchase_url' => $purchaseUrl,
152 'category' => 'crm',
153 ],
154 'zapier' => [
155 'title' => __('Zapier', 'fluentform'),
156 'description' => __('Connect your Fluent Forms data with Zapier and push data to thousands of online softwares.', 'fluentform'),
157 'logo' => fluentFormMix('img/integrations/zapier.png'),
158 'enabled' => 'no',
159 'purchase_url' => $purchaseUrl,
160 'category' => 'crm',
161 ],
162 'trello' => [
163 'title' => __('Trello', 'fluentform'),
164 'description' => __('Fluent Forms Trello Module allows you to create Trello card from submiting forms.', 'fluentform'),
165 'logo' => fluentFormMix('img/integrations/trello.png'),
166 'enabled' => 'no',
167 'purchase_url' => $purchaseUrl,
168 'category' => 'crm',
169 ],
170 'google_sheet' => [
171 'title' => __('Google Sheet', 'fluentform'),
172 'description' => __('Add Fluent Forms Submission to Google sheets when a form is submitted.', 'fluentform'),
173 'logo' => fluentFormMix('img/integrations/google-sheets.png'),
174 'enabled' => 'no',
175 'purchase_url' => $purchaseUrl,
176 'category' => 'crm',
177 ],
178 'activecampaign' => [
179 'title' => __('ActiveCampaign', 'fluentform'),
180 'description' => __('Fluent Forms ActiveCampaign Module allows you to create ActiveCampaign list signup forms in WordPress, so you can grow your email list.', 'fluentform'),
181 'logo' => fluentFormMix('img/integrations/activecampaign.png'),
182 'enabled' => 'no',
183 'purchase_url' => $purchaseUrl,
184 'category' => 'crm',
185 ],
186 'campaign_monitor' => [
187 'title' => __('Campaign Monitor', 'fluentform'),
188 'description' => __('Fluent Forms Campaign Monitor module allows you to create Campaign Monitor newsletter signup forms in WordPress, so you can grow your email list.', 'fluentform'),
189 'logo' => fluentFormMix('img/integrations/campaignmonitor.png'),
190 'enabled' => 'no',
191 'purchase_url' => $purchaseUrl,
192 'category' => 'crm',
193 ],
194 'constatantcontact' => [
195 'title' => __('Constant Contact', 'fluentform'),
196 'description' => __('Connect Constant Contact with Fluent Forms and create subscriptions forms right into WordPress and grow your list.', 'fluentform'),
197 'logo' => fluentFormMix('img/integrations/constantcontact.png'),
198 'enabled' => 'no',
199 'purchase_url' => $purchaseUrl,
200 'category' => 'crm',
201 ],
202 'convertkit' => [
203 'title' => __('ConvertKit', 'fluentform'),
204 'description' => __('Connect ConvertKit with Fluent Forms and create subscription forms right into WordPress and grow your list.', 'fluentform'),
205 'logo' => fluentFormMix('img/integrations/convertkit.png'),
206 'enabled' => 'no',
207 'purchase_url' => $purchaseUrl,
208 'category' => 'crm',
209 ],
210 'getresponse' => [
211 'title' => __('GetResponse', 'fluentform'),
212 'description' => __('Fluent Forms GetResponse module allows you to create GetResponse newsletter signup forms in WordPress, so you can grow your email list.', 'fluentform'),
213 'logo' => fluentFormMix('img/integrations/getresponse.png'),
214 'enabled' => 'no',
215 'purchase_url' => $purchaseUrl,
216 'category' => 'crm',
217 ],
218 'hubspot' => [
219 'title' => __('Hubspot', 'fluentform'),
220 'description' => __('Connect HubSpot with Fluent Forms and subscribe a contact when a form is submitted.', 'fluentform'),
221 'logo' => fluentFormMix('img/integrations/hubspot.png'),
222 'enabled' => 'no',
223 'purchase_url' => $purchaseUrl,
224 'category' => 'crm',
225 ],
226 'icontact' => [
227 'title' => __('iContact', 'fluentform'),
228 'description' => __('Connect iContact with Fluent Forms and subscribe a contact when a form is submitted.', 'fluentform'),
229 'logo' => fluentFormMix('img/integrations/icontact.png'),
230 'enabled' => 'no',
231 'purchase_url' => $purchaseUrl,
232 'category' => 'crm',
233 ],
234 'platformly' => [
235 'title' => __('Platformly', 'fluentform'),
236 'description' => __('Connect Platform.ly with Fluent Forms and subscribe a contact when a form is submitted.', 'fluentform'),
237 'logo' => fluentFormMix('img/integrations/platformly.png'),
238 'enabled' => 'no',
239 'purchase_url' => $purchaseUrl,
240 'category' => 'crm',
241 ],
242 'moosend' => [
243 'title' => __('MooSend', 'fluentform'),
244 'description' => __('Connect MooSend with Fluent Forms and subscribe a contact when a form is submitted.', 'fluentform'),
245 'logo' => fluentFormMix('img/integrations/moosend_logo.png'),
246 'enabled' => 'no',
247 'purchase_url' => $purchaseUrl,
248 'category' => 'crm',
249 ],
250 'sendfox' => [
251 'title' => __('SendFox', 'fluentform'),
252 'description' => __('Connect SendFox with Fluent Forms and subscribe a contact when a form is submitted.', 'fluentform'),
253 'logo' => fluentFormMix('img/integrations/sendfox.png'),
254 'enabled' => 'no',
255 'purchase_url' => $purchaseUrl,
256 'category' => 'crm',
257 ],
258 'mailerlite' => [
259 'title' => __('MailerLite', 'fluentform'),
260 'description' => __('Connect your Fluent Forms with MailerLite and add subscribers easily.', 'fluentform'),
261 'logo' => fluentFormMix('img/integrations/mailerlite.png'),
262 'enabled' => 'no',
263 'purchase_url' => $purchaseUrl,
264 'category' => 'crm',
265 ],
266 'sms_notifications' => [
267 'title' => __('SMS Notification', 'fluentform'),
268 'description' => __('Send SMS in real time when a form is submitted with Twilio.', 'fluentform'),
269 'logo' => fluentFormMix('img/integrations/twilio.png'),
270 'enabled' => 'no',
271 'purchase_url' => $purchaseUrl,
272 'category' => 'crm',
273 ],
274 'get_gist' => [
275 'title' => __('Gist', 'fluentform'),
276 'description' => __('GetGist is Easy to use all-in-one software for live chat, email marketing automation, forms, knowledge base, and more for a complete 360° view of your contacts.', 'fluentform'),
277 'logo' => fluentFormMix('img/integrations/getgist.png'),
278 'enabled' => 'no',
279 'purchase_url' => $purchaseUrl,
280 'category' => 'crm',
281 ],
282 'sendinblue' => [
283 'title' => __('Brevo (formerly SendInBlue)', 'fluentform'),
284 'description' => __('Fluent Forms Brevo (formerly SendInBlue) Module allows you to create contacts on your list, so you can grow your email list.', 'fluentform'),
285 'logo' => fluentFormMix('img/integrations/brevo.png'),
286 'enabled' => 'no',
287 'purchase_url' => $purchaseUrl,
288 'category' => 'crm',
289 ],
290 'drip' => [
291 'title' => __('Drip', 'fluentform'),
292 'description' => __('Fluent Forms Drip Module allows you to create contacts on your Drip list, so you can grow your email list.', 'fluentform'),
293 'logo' => fluentFormMix('img/integrations/drip.png'),
294 'enabled' => 'no',
295 'purchase_url' => $purchaseUrl,
296 'category' => 'crm',
297 ],
298 'discord' => [
299 'title' => __('Discord', 'fluentform'),
300 'description' => __('Send notification with form data to your Discord channel when a form is submitted', 'fluentform'),
301 'logo' => fluentFormMix('img/integrations/discord.png'),
302 'enabled' => 'no',
303 'purchase_url' => $purchaseUrl,
304 'category' => 'crm',
305 ],
306 'telegram' => [
307 'title' => __('Telegram', 'fluentform'),
308 'description' => __('Send notification to Telegram channel or group when a form is submitted', 'fluentform'),
309 'logo' => fluentFormMix('img/integrations/telegram.png'),
310 'enabled' => 'no',
311 'purchase_url' => $purchaseUrl,
312 'category' => 'crm',
313 ],
314 'affiliateWp' => [
315 'title' => __('AffiliateWP', 'fluentform'),
316 'description' => __('Generate AffiliateWP referrals automatically when a customer is referred to your site via an affiliate link', 'fluentform'),
317 'logo' => fluentFormMix('img/integrations/affiliatewp.png'),
318 'enabled' => 'no',
319 'purchase_url' => $purchaseUrl,
320 'category' => 'crm',
321 ],
322 'clicksend_sms_notification' => [
323 'title' => __('ClickSend', 'fluentform'),
324 'description' => __('Send SMS in real time when a form is submitted with ClickSend', 'fluentform'),
325 'logo' => fluentFormMix('img/integrations/clicksend.png'),
326 'enabled' => 'no',
327 'purchase_url' => $purchaseUrl,
328 'category' => 'crm',
329 ],
330 'zohocrm' => [
331 'title' => __('Zoho CRM', 'fluentform'),
332 'description' => __('Zoho CRM is an online Sales CRM software that manages your sales, marketing and support in one CRM platform.', 'fluentform'),
333 'logo' => fluentFormMix('img/integrations/zohocrm.png'),
334 'enabled' => 'no',
335 'purchase_url' => $purchaseUrl,
336 'category' => 'crm',
337 ],
338 'cleverreach' => [
339 'title' => __('CleverReach', 'fluentform'),
340 'description' => __('CleverReach is web-based email marketing software for managing email campaigns and contacts. Use Fluent Forms to grow your CleverReach subscriber list', 'fluentform'),
341 'logo' => fluentFormMix('img/integrations/clever_reach.png'),
342 'enabled' => 'no',
343 'purchase_url' => $purchaseUrl,
344 'category' => 'crm',
345 ],
346 'salesflare' => [
347 'title' => __('Salesflare', 'fluentform'),
348 'description' => __('Create Salesflare contact from WordPress, so you can grow your contact list', 'fluentform'),
349 'logo' => fluentFormMix('img/integrations/salesflare.png'),
350 'enabled' => 'no',
351 'purchase_url' => $purchaseUrl,
352 'category' => 'crm',
353 ],
354 'automizy' => [
355 'title' => __('Automizy', 'fluentform'),
356 'description' => __('Connect Automizy with Fluent Forms and subscribe a contact when a form is submitted.', 'fluentform'),
357 'logo' => fluentFormMix('img/integrations/automizy.png'),
358 'enabled' => 'no',
359 'purchase_url' => $purchaseUrl,
360 'category' => 'crm',
361 ],
362 'salesforce' => [
363 'title' => __('Salesforce', 'fluentform'),
364 'description' => __('Salesforce helps your marketing, sales, commerce, service and IT teams work as one from anywhere — so you can keep your customers happy everywhere.', 'fluentform'),
365 'logo' => fluentFormMix('img/integrations/salesforce.png'),
366 'enabled' => 'no',
367 'purchase_url' => $purchaseUrl,
368 'category' => 'crm',
369 ],
370 'airtable' => [
371 'title' => __('Airtable', 'fluentform'),
372 'description' => __('Airtable is a low-code platform for building collaborative apps. Customize your workflow, collaborate, and achieve ambitious outcomes.', 'fluentform'),
373 'logo' => fluentFormMix('img/integrations/airtable.png'),
374 'enabled' => 'no',
375 'purchase_url' => $purchaseUrl,
376 'category' => 'crm',
377 ],
378 'mailjet' => [
379 'title' => __('Mailjet', 'fluentform'),
380 'description' => __('Mailjet is an easy-to-use all-in-one e-mail platform.', 'fluentform'),
381 'logo' => fluentFormMix('img/integrations/mailjet.png'),
382 'enabled' => 'no',
383 'purchase_url' => $purchaseUrl,
384 'category' => 'crm',
385 ],
386 'pipedrive' => [
387 'title' => __('Pipedrive', 'fluentform'),
388 'description' => __('By connecting Pipedrive with Fluent Forms, you can connect and organize leads and more.', 'fluentform'),
389 'logo' => fluentFormMix('img/integrations/pipedrive.png'),
390 'enabled' => 'no',
391 'purchase_url' => $purchaseUrl,
392 'category' => 'crm',
393 ],
394 'amocrm' => [
395 'title' => __('amoCRM', 'fluentform'),
396 'description' => __('It can be a great way to manage your leads and tasks with amoCRM and Fluent Forms.', 'fluentform'),
397 'logo' => fluentFormMix('img/integrations/amocrm.png'),
398 'enabled' => 'no',
399 'purchase_url' => $purchaseUrl,
400 'category' => 'crm',
401 ],
402 'onepagecrm' => [
403 'title' => __('OnePageCRM', 'fluentform'),
404 'description' => __('Complete your actions with the combination of Fluent Forms and OnePageCRM to collect leads and more.', 'fluentform'),
405 'logo' => fluentFormMix('img/integrations/onepagecrm.png'),
406 'enabled' => 'no',
407 'purchase_url' => $purchaseUrl,
408 'category' => 'crm',
409 ],
410 'insightly' => [
411 'title' => __('Insightly', 'fluentform'),
412 'description' => __('With Insightly CRM, you can tailor the standard sales processes of contact, lead and opportunity management.', 'fluentform'),
413 'logo' => fluentFormMix('img/integrations/insightly.png'),
414 'enabled' => 'no',
415 'purchase_url' => $purchaseUrl,
416 'category' => 'crm',
417 ],
418 'mailster' => [
419 'title' => __('Mailster', 'fluentform'),
420 'description' => __('Send Beautiful Email Newsletters in WordPress. Join more than 26,000 people worldwide and use Mailster to grow your business.', 'fluentform'),
421 'logo' => fluentFormMix('img/integrations/mailster.png'),
422 'enabled' => 'no',
423 'purchase_url' => $purchaseUrl,
424 'category' => 'crm',
425 ],
426 'quiz_addon' => [
427 'title' => __('Quiz Module', 'fluentform'),
428 'description' => __('With this module, you can create quizzes and show scores with grades, points, fractions, or percentages', 'fluentform'),
429 'logo' => fluentFormMix('img/integrations/quiz-icon.svg'),
430 'enabled' => 'no',
431 'purchase_url' => $purchaseUrl,
432 'category' => 'wp_core',
433 ],
434 'notion' => [
435 'title' => __('Notion', 'fluentform'),
436 'description' => __('Capture Fluent Forms Submission to your Notion workspaces — and do it exactly the way you want.', 'fluentform'),
437 'logo' => fluentFormMix('img/integrations/notion.png'),
438 'enabled' => 'no',
439 'purchase_url' => $purchaseUrl,
440 'category' => 'crm',
441 ],
442 ];
443
444 foreach ($addOns as $key => &$addOn) {
445 $feature = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $key));
446 $addOn['purchase_url'] = fluentform_upgrade_url('feature_lock_' . $feature);
447 }
448
449 return $addOns;
450 }
451
452 /**
453 * Show the suggested plugins list.
454 */
455 public function showSuggestedPlugins()
456 {
457 wp_enqueue_script('fluentform-modules');
458
459 $suggestedPlugins = $this->getSuggestedPlugins();
460
461 wp_localize_script('fluentform-modules', 'fluent_suggested_plugins', [
462 'plugins' => $suggestedPlugins,
463 'nonce' => wp_create_nonce('fluent_forms_suggested_plugins'),
464 'assets_url' => fluentFormMix('img/suggested-plugins/'),
465 ]);
466
467 wpFluentForm('view')->render('admin.addons.suggested_plugins', []);
468 }
469
470 /**
471 * Get the list of suggested WordPress plugins.
472 *
473 * @return array
474 */
475 public function getSuggestedPlugins()
476 {
477 $plugins = [
478 'fluent-cart' => [
479 'title' => __('FluentCart', 'fluentform'),
480 'description' => __('A performance-first, self-hosted eCommerce platform for WordPress', 'fluentform'),
481 'logo' => 'fcart.svg',
482 'slug' => 'fluent-cart/fluent-cart.php',
483 'basename' => 'fluent-cart',
484 'badge_type' => 'official',
485 'wporg_url' => 'https://wordpress.org/plugins/fluent-cart/',
486 'setup_url' => admin_url('admin.php?page=fluent-cart'),
487 'setup_label' => __('Dashboard', 'fluentform'),
488 ],
489 'fluent-smtp' => [
490 'title' => __('FluentSMTP', 'fluentform'),
491 'description' => __('The Ultimate Free SMTP Plugin for WordPress. Safely send emails via Amazon SES, Mailgun, SendGrid, Outlook, Gmail, and more.',
492 'fluentform'),
493 'logo' => 'fluent-smtp.svg',
494 'slug' => 'fluent-smtp/fluent-smtp.php',
495 'basename' => 'fluent-smtp',
496 'badge_type' => 'official',
497 'wporg_url' => 'https://wordpress.org/plugins/fluent-smtp/',
498 'setup_url' => admin_url('options-general.php?page=fluent-mail#/connections'),
499 'setup_label' => __('Configure', 'fluentform'),
500 ],
501 'multilingual-forms-fluent-forms-wpml' => [
502 'title' => __('Multilingual Forms for Fluent Forms (WPML)', 'fluentform'),
503 'description' => __('Make Fluent Forms multilingual with WPML integration', 'fluentform'),
504 'logo' => 'wpml-ff.png',
505 'slug' => 'multilingual-forms-fluent-forms-wpml/multilingual-forms-for-fluent-forms-with-wpml.php',
506 'basename' => 'multilingual-forms-fluent-forms-wpml',
507 'badge_type' => 'official',
508 'wporg_url' => 'https://wordpress.org/plugins/multilingual-forms-fluent-forms-wpml/',
509 ],
510 'cloud-storage-manager' => [
511 'title' => __('Cloud Storage Manager for Fluent Forms', 'fluentform'),
512 'description' => __('Cloud Storage Manager bridges the gap between your fluent forms and popular cloud storage platforms.',
513 'fluentform'),
514 'logo' => 'cloud-storage-manager.png',
515 'slug' => 'cloud-storage-manager/cloud-storage-manager.php',
516 'basename' => 'cloud-storage-manager',
517 'badge_type' => 'verified',
518 'wporg_url' => 'https://wordpress.org/plugins/cloud-storage-manager/',
519 ],
520 'fluent-pdf' => [
521 'title' => __('Fluent Forms PDF', 'fluentform'),
522 'description' => __('Generate PDF from Fluent Forms Submissions and Send via Email or Download',
523 'fluentform'),
524 'logo' => 'fluent-pdf.svg',
525 'slug' => 'fluentforms-pdf/fluentforms-pdf.php',
526 'basename' => 'fluentforms-pdf',
527 'badge_type' => 'official',
528 'wporg_url' => 'https://wordpress.org/plugins/fluentforms-pdf/',
529 'setup_url' => admin_url('admin.php?page=fluent_forms_add_ons&sub_page=fluentform_pdf'),
530 'setup_label' => __('Configure', 'fluentform'),
531 ],
532 'fluent-community' => [
533 'title' => __('FluentCommunity', 'fluentform'),
534 'description' => __('Build Your Own Community & Membership Site with FluentCommunity', 'fluentform'),
535 'logo' => 'fluent-community.svg',
536 'slug' => 'fluent-community/fluent-community.php',
537 'basename' => 'fluent-community',
538 'badge_type' => 'official',
539 'wporg_url' => 'https://wordpress.org/plugins/fluent-community/',
540 'setup_url' => admin_url('admin.php?page=fluent-community'),
541 'setup_label' => __('Dashboard', 'fluentform'),
542 ],
543 'fluent-support' => [
544 'title' => __('Fluent Support', 'fluentform'),
545 'description' => __('WordPress Helpdesk and Customer Support Ticket Plugin', 'fluentform'),
546 'logo' => 'fluent-support.svg',
547 'slug' => 'fluent-support/fluent-support.php',
548 'basename' => 'fluent-support',
549 'badge_type' => 'official',
550 'wporg_url' => 'https://wordpress.org/plugins/fluent-support/',
551 'setup_url' => admin_url('admin.php?page=fluent-support'),
552 'setup_label' => __('Dashboard', 'fluentform'),
553 ],
554 'wp-social-reviews' => [
555 'title' => __('WP Social Ninja', 'fluentform'),
556 'description' => __('Best Social Media Plugin for WordPress to Showcase Social Feeds, Reviews, and Chat Widgets',
557 'fluentform'),
558 'logo' => 'wp-social-reviews.gif',
559 'slug' => 'wp-social-reviews/wp-social-reviews.php',
560 'basename' => 'wp-social-reviews',
561 'badge_type' => 'official',
562 'wporg_url' => 'https://wordpress.org/plugins/wp-social-reviews/',
563 'setup_url' => admin_url('admin.php?page=wpsocialninja.php'),
564 'setup_label' => __('Dashboard', 'fluentform'),
565 ],
566 'fluent-crm' => [
567 'title' => __('FluentCRM', 'fluentform'),
568 'description' => __('Email Marketing Automation and CRM Plugin for WordPress', 'fluentform'),
569 'logo' => 'fluent-crm.svg',
570 'slug' => 'fluent-crm/fluent-crm.php',
571 'basename' => 'fluent-crm',
572 'badge_type' => 'official',
573 'wporg_url' => 'https://wordpress.org/plugins/fluent-crm/',
574 'setup_url' => admin_url('admin.php?page=fluentcrm-admin'),
575 'setup_label' => __('Dashboard', 'fluentform'),
576 ],
577 ];
578
579 // Add status to each plugin
580 foreach ($plugins as $key => &$plugin) {
581 $plugin['status'] = $this->getPluginStatus($plugin['slug']);
582 }
583
584 return $plugins;
585 }
586
587 /**
588 * Get the installation and activation status of a plugin.
589 *
590 * @param string $pluginSlug The plugin slug (e.g., 'fluent-crm/fluent-crm.php')
591 * @return string 'active', 'inactive', or 'not_installed'
592 */
593 private function getPluginStatus($pluginSlug)
594 {
595 // Check if plugin file exists
596 $pluginFile = WP_PLUGIN_DIR . '/' . $pluginSlug;
597
598 if (!file_exists($pluginFile)) {
599 return 'not_installed';
600 }
601
602 // Ensure is_plugin_active function is available
603 if (!function_exists('is_plugin_active')) {
604 require_once ABSPATH . 'wp-admin/includes/plugin.php';
605 }
606 // Check if plugin is active
607 if (is_plugin_active($pluginSlug)) {
608 return 'active';
609 }
610
611 return 'inactive';
612 }
613 }
614