PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.4.3
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.4.3
3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / addons / Addons.php
everest-forms / addons Last commit date
BeaverBuilder 1 year ago BricksBuilder 1 year ago CleanTalk 1 year ago DiviBuilder 4 months ago OxygenBuilder 1 year ago StyleCustomizer 4 months ago WPBakeryBuilder 1 year ago Addons.php 1 year ago
Addons.php
136 lines
1 <?php
2 /**
3 * Addons main files.
4 *
5 * @since 3.0.5
6 * @package EverestForms\Addons\Addons
7 */
8
9 namespace EverestForms\Addons;
10
11 use EverestForms\Addons\BricksBuilder\BricksBuilder;
12 use EverestForms\Addons\OxygenBuilder\OxygenBuilder;
13 use EverestForms\Addons\StyleCustomizer\StyleCustomizer;
14 use EverestForms\Addons\DiviBuilder\DiviBuilder;
15 use EverestForms\Addons\BeaverBuilder\BeaverBuilder;
16 use EverestForms\Addons\CleanTalk\CleanTalk;
17 use EverestForms\Addons\WPBakeryBuilder\WPBakeryBuilder;
18 use EverestForms\Traits\Singleton;
19
20 /**
21 * Addon class.
22 *
23 * @since 3.0.5
24 */
25 class Addons {
26
27 use Singleton;
28
29 /**
30 * Class constructor.
31 *
32 * @since 3.0.5
33 */
34 public function __construct() {
35 add_action( 'init', array( $this, 'addons_init' ) );
36 add_action( 'init', array( $this, 'not_addons_init' ) );
37 add_filter( 'everest_forms_integrations', array( $this, 'add_integration' ) );
38 }
39
40 /**
41 * Register integration.
42 *
43 * @param array $integrations List of integrations.
44 *
45 * @since 3.2.2
46 */
47 public function add_integration( $integrations ) {
48
49 $no_module_classes = array(
50 'clean-talk' => 'EverestForms\Addons\CleanTalk\Settings\Settings',
51 );
52
53 foreach ( $no_module_classes as $key => $class_name ) {
54 $integrations[] = $class_name;
55 }
56
57 return $integrations;
58 }
59 /**
60 * Get addon list.
61 *
62 * @since 3.0.5
63 */
64 public function get_addon_list() {
65 /**
66 * Everest forms addon list.
67 *
68 * @since 3.0.5
69 * @return array List of addon class.
70 */
71 return apply_filters(
72 'everest_forms_addon_list',
73 array(
74 'oxygen-builder' => OxygenBuilder::class,
75 'bricks-builder' => BricksBuilder::class,
76 'divi-builder' => DiviBuilder::class,
77 'beaver-builder' => BeaverBuilder::class,
78 'wpbakery-builder' => WPBakeryBuilder::class,
79 'style-customizer' => StyleCustomizer::class,
80 )
81 );
82 }
83
84 /**
85 * Addons but not showcase in dashboard.
86 *
87 * @since 3.2.0
88 */
89 public function not_addons_init() {
90 $addons = array(
91 'clean-talk' => CleanTalk::class,
92 );
93
94 foreach ( $addons as $key => $class_name ) {
95 if ( class_exists( $class_name ) ) {
96 $class_name::init();
97 }
98 }
99 }
100
101 /**
102 * Initializes the Everest Forms addons.
103 *
104 * @since 3.0.5
105 */
106 public function addons_init() {
107
108 $classes = $this->get_addon_list();
109
110 if ( empty( $classes ) ) {
111 return;
112 }
113
114 $enabled_features = get_option( 'everest_forms_enabled_features', array() );
115 $new_feature = 'everest-forms-style-customizer';
116 if ( false === get_option( 'everest_forms_style_enabled' ) && ! in_array( $new_feature, $enabled_features, true ) ) {
117 $enabled_features[] = $new_feature;
118 update_option( 'everest_forms_style_enabled', true );
119 update_option( 'everest_forms_enabled_features', $enabled_features );
120 }
121
122 if ( empty( $enabled_features ) ) {
123 return;
124 }
125
126 foreach ( $classes as $key => $class_name ) {
127 $key = 'everest-forms-' . $key;
128 if ( in_array( $key, $enabled_features, true ) ) {
129 if ( class_exists( $class_name ) ) {
130 $class_name::init();
131 }
132 }
133 }
134 }
135 }
136