PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.14
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.14
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
weforms / includes / class-integration-manager.php

class-integration-manager.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.6.14, at includes/class-integration-manager.php

53 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The Integration Loader
5 */
6 class WeForms_Integration_Manager {
7
8 /**
9 * The integration instances
10 *
11 * @var array
12 */
13 public $integrations = [];
14
15 /**
16 * Return loaded integrations.
17 *
18 * @return array
19 */
20 public function get_integrations() {
21 if ( $this->integrations ) {
22 return $this->integrations;
23 }
24
25 require_once WEFORMS_INCLUDES . '/integrations/slack/class-integration-slack.php';
26 require_once WEFORMS_INCLUDES . '/integrations/erp/class-integration-erp.php';
27 require_once WEFORMS_INCLUDES . '/integrations/mailpoet/class-integration-mailpoet.php';
28 require_once WEFORMS_INCLUDES . '/integrations/sprout-invoices/class-integration-sprout-invoices.php';
29
30 $integrations = apply_filters( 'weforms_integrations', [
31 'WeForms_Integration_Slack', 'WeForms_Integration_ERP', 'WeForms_Integration_MailPoet_Free', 'WeForms_Integration_SI',
32 ] );
33
34 // Load integration classes
35 foreach ( $integrations as $integration ) {
36 $integration_instance = new $integration();
37
38 $this->integrations[ $integration_instance->id ] = $integration_instance;
39 }
40
41 return $this->integrations;
42 }
43
44 public function get_integration_js_settings() {
45 $settings = [];
46
47 foreach ( $this->get_integrations() as $integration_id => $integration ) {
48 $settings[ $integration_id ] = $integration->get_js_settings();
49 }
50
51 return $settings;
52 }
53 }