WordPress Page Builder – Beaver Builder - Version 1.6.0.1

Version Description

Download this release

Release Info

Developer justinbusa
Plugin Icon 128x128 WordPress Page Builder – Beaver Builder
Version 1.6.0.1
Comparing to
See all releases

Code changes from version 1.5.9 to 1.6.0.1

Files changed (48) hide show
  1. changelog.txt +30 -0
  2. classes/class-fl-builder-model.php +1 -1
  3. classes/class-fl-builder-service-activecampaign.php +249 -0
  4. classes/class-fl-builder-service-email-address.php +130 -0
  5. classes/class-fl-builder-service-mailchimp.php +134 -3
  6. classes/class-fl-builder-services.php +10 -0
  7. classes/class-fl-builder.php +67 -21
  8. css/fl-builder-layout-rtl.css +6 -0
  9. css/fl-builder.css +4 -0
  10. fl-builder.php +2 -2
  11. includes/column-css.php +54 -9
  12. includes/column-settings.php +24 -0
  13. includes/field-editor.php +1 -1
  14. includes/field-multiple-photos.php +19 -10
  15. includes/field-select.php +16 -6
  16. includes/row-css.php +54 -9
  17. includes/row-settings.php +27 -3
  18. includes/updater-config.php +1 -1
  19. includes/vendor/activecampaign/Account.class.php +73 -0
  20. includes/vendor/activecampaign/ActiveCampaign.class.php +128 -0
  21. includes/vendor/activecampaign/Auth.class.php +25 -0
  22. includes/vendor/activecampaign/Automation.class.php +51 -0
  23. includes/vendor/activecampaign/Campaign.class.php +133 -0
  24. includes/vendor/activecampaign/Connector.class.php +226 -0
  25. includes/vendor/activecampaign/Contact.class.php +121 -0
  26. includes/vendor/activecampaign/Deal.class.php +139 -0
  27. includes/vendor/activecampaign/Design.class.php +31 -0
  28. includes/vendor/activecampaign/Form.class.php +291 -0
  29. includes/vendor/activecampaign/Group.class.php +55 -0
  30. includes/vendor/activecampaign/List.class.php +91 -0
  31. includes/vendor/activecampaign/Message.class.php +103 -0
  32. includes/vendor/activecampaign/Settings.class.php +25 -0
  33. includes/vendor/activecampaign/Subscriber.class.php +6 -0
  34. includes/vendor/activecampaign/Tracking.class.php +118 -0
  35. includes/vendor/activecampaign/User.class.php +71 -0
  36. includes/vendor/activecampaign/Webhook.class.php +84 -0
  37. includes/vendor/activecampaign/config.php +6 -0
  38. includes/vendor/infusionsoft/xmlrpc-3.0/extras/rsakey.pem +0 -9
  39. includes/vendor/infusionsoft/xmlrpc-3.0/extras/test.pl +0 -52
  40. includes/vendor/infusionsoft/xmlrpc-3.0/extras/test.py +0 -37
  41. includes/vendor/infusionsoft/xmlrpc-3.0/extras/workspace.testPhpServer.fttb +0 -2
  42. js/fl-builder-layout.js +53 -0
  43. js/fl-builder-preview.js +73 -25
  44. js/fl-builder-services.js +54 -0
  45. js/fl-builder.js +16 -4
  46. languages/de_DE.po +1 -1
  47. languages/es_ES.mo +0 -0
  48. languages/es_ES.po +151 -151
changelog.txt CHANGED
@@ -1,3 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>1.5.9 - 06/01/2015</h4>
2
  <p><strong>Enhancements</strong></p>
3
  <ul>
1
+ <h4>1.6.0.1 - 06/28/2015</h4>
2
+ <p><strong>Enhancements</strong></p>
3
+ <ul>
4
+ <li>Added fl_builder_layout_style_dependencies filter.</li>
5
+ </ul>
6
+ <p><strong>Bug Fixes</strong></p>
7
+ <ul>
8
+ <li>Fixed a bug with importing templates that have slideshows or galleries.</li>
9
+ <li>Fixed a bug with row margins when the background is set to a slideshow or video.</li>
10
+ </ul>
11
+
12
+ <h4>1.6.0 - 06/22/2015</h4>
13
+ <p><strong>Enhancements</strong></p>
14
+ <ul>
15
+ <li>Added link, hover and heading color settings to rows and columns.</li>
16
+ <li>Tab and accordion items now open when linked to from another page.</li>
17
+ <li>Accordion items now have an active class when open.</li>
18
+ <li>Column layouts now support RTL languages.</li>
19
+ <li>Added an email address option to the Subscribe Form module so signups can be sent to your email address.</li>
20
+ <li>Added support for MailChimp groups to the Subscribe Form module.</li>
21
+ <li>Added ActiveCampaign integration.</li>
22
+ </ul>
23
+ <p><strong>Bug Fixes</strong></p>
24
+ <ul>
25
+ <li>Fixed a bug with the window closing when publishing changes.</li>
26
+ <li>Fixed a bug with getting the correct ID for the current post.</li>
27
+ <li>Fixed a bug with row borders showing when none are set and the background is a slideshow.</li>
28
+ <li>Fixed a bug with the multiple photos field when used in a nested form.</li>
29
+ </ul>
30
+
31
  <h4>1.5.9 - 06/01/2015</h4>
32
  <p><strong>Enhancements</strong></p>
33
  <ul>
classes/class-fl-builder-model.php CHANGED
@@ -280,7 +280,7 @@ final class FLBuilderModel {
280
  return $post_data['post_id'];
281
  }
282
  // Get a post ID from the main query.
283
- else if ( in_the_loop() && isset( $wp_the_query ) && isset( $wp_the_query->post ) ) {
284
  return $wp_the_query->post->ID;
285
  }
286
  // Get a post ID in a query outside of the main loop.
280
  return $post_data['post_id'];
281
  }
282
  // Get a post ID from the main query.
283
+ else if ( in_the_loop() && is_main_query() && isset( $wp_the_query->post ) ) {
284
  return $wp_the_query->post->ID;
285
  }
286
  // Get a post ID in a query outside of the main loop.
classes/class-fl-builder-service-activecampaign.php ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Helper class for the ActiveCampaign API.
5
+ *
6
+ * @since 1.6.0
7
+ */
8
+ final class FLBuilderServiceActiveCampaign extends FLBuilderService {
9
+
10
+ /**
11
+ * The ID for this service.
12
+ *
13
+ * @since 1.6.0
14
+ * @var string $id
15
+ */
16
+ public $id = 'activecampaign';
17
+
18
+ /**
19
+ * @since 1.6.0
20
+ * @var object $api_instance
21
+ * @access private
22
+ */
23
+ private $api_instance = null;
24
+
25
+ /**
26
+ * Get an instance of the API.
27
+ *
28
+ * @since 1.6.0
29
+ * @param string $api_url A valid API url.
30
+ * @param string $api_key A valid API key.
31
+ * @return object The API instance.
32
+ */
33
+ public function get_api( $api_url, $api_key )
34
+ {
35
+ if ( $this->api_instance ) {
36
+ return $this->api_instance;
37
+ }
38
+ if ( ! class_exists( 'ActiveCampaign' ) ) {
39
+ require_once FL_BUILDER_DIR . 'includes/vendor/activecampaign/ActiveCampaign.class.php';
40
+ }
41
+
42
+ $this->api_instance = new ActiveCampaign( $api_url, $api_key );
43
+
44
+ return $this->api_instance;
45
+ }
46
+
47
+ /**
48
+ * Test the API connection.
49
+ *
50
+ * @since 1.6.0
51
+ * @param array $fields {
52
+ * @type string $api_url A valid API url.
53
+ * @type string $api_key A valid API key.
54
+ * }
55
+ * @return array{
56
+ * @type bool|string $error The error message or false if no error.
57
+ * @type array $data An array of data used to make the connection.
58
+ * }
59
+ */
60
+ public function connect( $fields = array() )
61
+ {
62
+ $response = array(
63
+ 'error' => false,
64
+ 'data' => array()
65
+ );
66
+
67
+ // Make sure we have an API url.
68
+ if ( ! isset( $fields['api_url'] ) || empty( $fields['api_url'] ) ) {
69
+ $response['error'] = __( 'Error: You must provide an API URL.', 'fl-builder' );
70
+ }
71
+ // Make sure we have an API key.
72
+ else if ( ! isset( $fields['api_key'] ) || empty( $fields['api_key'] ) ) {
73
+ $response['error'] = __( 'Error: You must provide an API key.', 'fl-builder' );
74
+ }
75
+ // Try to connect and store the connection data.
76
+ else {
77
+
78
+ $api = $this->get_api( $fields['api_url'], $fields['api_key'] );
79
+
80
+ if ( ! (int) $api->credentials_test() ) {
81
+ $response['error'] = __( 'Error: Please check your API URL and API key.', 'fl-builder' );
82
+ }
83
+ else {
84
+ $response['data'] = array(
85
+ 'api_url' => $fields['api_url'],
86
+ 'api_key' => $fields['api_key']
87
+ );
88
+ }
89
+ }
90
+
91
+ return $response;
92
+ }
93
+
94
+ /**
95
+ * Renders the markup for the connection settings.
96
+ *
97
+ * @since 1.6.0
98
+ * @return string The connection settings markup.
99
+ */
100
+ public function render_connect_settings()
101
+ {
102
+ ob_start();
103
+
104
+ FLBuilder::render_settings_field( 'api_url', array(
105
+ 'row_class' => 'fl-builder-service-connect-row',
106
+ 'class' => 'fl-builder-service-connect-input',
107
+ 'type' => 'text',
108
+ 'label' => __( 'API URL', 'fl-builder' ),
109
+ 'help' => __( 'Your API url can be found in your ActiveCampaign account under My Settings > API.', 'fl-builder' ),
110
+ 'preview' => array(
111
+ 'type' => 'none'
112
+ )
113
+ ));
114
+
115
+ FLBuilder::render_settings_field( 'api_key', array(
116
+ 'row_class' => 'fl-builder-service-connect-row',
117
+ 'class' => 'fl-builder-service-connect-input',
118
+ 'type' => 'text',
119
+ 'label' => __( 'API Key', 'fl-builder' ),
120
+ 'help' => __( 'Your API key can be found in your ActiveCampaign account under My Settings > API.', 'fl-builder' ),
121
+ 'preview' => array(
122
+ 'type' => 'none'
123
+ )
124
+ ));
125
+
126
+ return ob_get_clean();
127
+ }
128
+
129
+ /**
130
+ * Render the markup for service specific fields.
131
+ *
132
+ * @since 1.6.0
133
+ * @param string $account The name of the saved account.
134
+ * @param object $settings Saved module settings.
135
+ * @return array {
136
+ * @type bool|string $error The error message or false if no error.
137
+ * @type string $html The field markup.
138
+ * }
139
+ */
140
+ public function render_fields( $account, $settings )
141
+ {
142
+ $post_data = FLBuilderModel::get_post_data();
143
+ $account_data = $this->get_account_data( $account );
144
+ $api = $this->get_api( $account_data['api_url'], $account_data['api_key'] );
145
+ $response = array(
146
+ 'error' => false,
147
+ 'html' => ''
148
+ );
149
+
150
+ $lists = $api->api( 'list/list?ids=all' );
151
+ $response['html'] = $this->render_list_field( $lists, $settings );
152
+
153
+ return $response;
154
+ }
155
+
156
+ /**
157
+ * Render markup for the list field.
158
+ *
159
+ * @since 1.6.0
160
+ * @param array $lists List data from the API.
161
+ * @param object $settings Saved module settings.
162
+ * @return string The markup for the list field.
163
+ * @access private
164
+ */
165
+ private function render_list_field( $lists, $settings )
166
+ {
167
+ ob_start();
168
+
169
+ $options = array( '' => __( 'Choose...', 'fl-builder' ) );
170
+
171
+ foreach ( (array) $lists as $list ) {
172
+ if ( is_object( $list ) && isset( $list->id ) ) {
173
+ $options[ $list->id ] = $list->name;
174
+ }
175
+ }
176
+
177
+ FLBuilder::render_settings_field( 'list_id', array(
178
+ 'row_class' => 'fl-builder-service-field-row',
179
+ 'class' => 'fl-builder-service-list-select',
180
+ 'type' => 'select',
181
+ 'label' => _x( 'List', 'An email list from a third party provider.', 'fl-builder' ),
182
+ 'options' => $options,
183
+ 'preview' => array(
184
+ 'type' => 'none'
185
+ )
186
+ ), $settings);
187
+
188
+ return ob_get_clean();
189
+ }
190
+
191
+ /**
192
+ * Subscribe an email address to ActiveCampaign.
193
+ *
194
+ * @since 1.6.0
195
+ * @param object $settings A module settings object.
196
+ * @param string $email The email to subscribe.
197
+ * @param string $name Optional. The full name of the person subscribing.
198
+ * @return array {
199
+ * @type bool|string $error The error message or false if no error.
200
+ * }
201
+ */
202
+ public function subscribe( $settings, $email, $name = false )
203
+ {
204
+ $account_data = $this->get_account_data( $settings->service_account );
205
+ $response = array( 'error' => false );
206
+
207
+ if ( ! $account_data ) {
208
+ $response['error'] = __( 'There was an error subscribing to ActiveCampaign. The account is no longer connected.', 'fl-builder' );
209
+ }
210
+ else {
211
+
212
+ $api = $this->get_api( $account_data['api_url'], $account_data['api_key'] );
213
+ $data = array(
214
+ 'email' => $email,
215
+ 'p' => array( $settings->list_id ),
216
+ 'status' => 1,
217
+ 'instantresponders' => array( 1 )
218
+ );
219
+
220
+ // Name
221
+ if ( $name ) {
222
+
223
+ $names = explode( ' ', $name );
224
+
225
+ if ( isset( $names[0] ) ) {
226
+ $data['first_name'] = $names[0];
227
+ }
228
+ if ( isset( $names[1] ) ) {
229
+ $data['last_name'] = $names[1];
230
+ }
231
+ }
232
+
233
+ // Subscribe
234
+ $result = $api->api( 'contact/add', $data );
235
+
236
+ if ( ! $result->success && isset( $result->error ) && ! stristr( $result->error, 'duplicate' ) ) {
237
+
238
+ if ( stristr( $result->error, 'access' ) ) {
239
+ $response['error'] = __( 'Error: Invalid API data.', 'fl-builder' );
240
+ }
241
+ else {
242
+ $response['error'] = $result->error;
243
+ }
244
+ }
245
+ }
246
+
247
+ return $response;
248
+ }
249
+ }
classes/class-fl-builder-service-email-address.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Helper class for adding an email address as a service.
5
+ *
6
+ * @since 1.6.0
7
+ */
8
+ final class FLBuilderServiceEmailAddress extends FLBuilderService {
9
+
10
+ /**
11
+ * The ID for this service.
12
+ *
13
+ * @since 1.6.0
14
+ * @var string $id
15
+ */
16
+ public $id = 'email-address';
17
+
18
+ /**
19
+ * Test the API connection.
20
+ *
21
+ * @since 1.6.0
22
+ * @param array $fields {
23
+ * @type string $email A valid email address.
24
+ * }
25
+ * @return array{
26
+ * @type bool|string $error The error message or false if no error.
27
+ * @type array $data An array of data used to make the connection.
28
+ * }
29
+ */
30
+ public function connect( $fields = array() )
31
+ {
32
+ $response = array(
33
+ 'error' => false,
34
+ 'data' => array()
35
+ );
36
+
37
+ // Make sure we have an email address.
38
+ if ( ! isset( $fields['email'] ) || empty( $fields['email'] ) ) {
39
+ $response['error'] = __( 'Error: You must provide an email address.', 'fl-builder' );
40
+ }
41
+ // Store the connection data.
42
+ else {
43
+ $response['data'] = array( 'email' => $fields['email'] );
44
+ }
45
+
46
+ return $response;
47
+ }
48
+
49
+ /**
50
+ * Renders the markup for the connection settings.
51
+ *
52
+ * @since 1.6.0
53
+ * @return string The connection settings markup.
54
+ */
55
+ public function render_connect_settings()
56
+ {
57
+ ob_start();
58
+
59
+ FLBuilder::render_settings_field( 'email', array(
60
+ 'row_class' => 'fl-builder-service-connect-row',
61
+ 'class' => 'fl-builder-service-connect-input',
62
+ 'type' => 'text',
63
+ 'label' => __( 'Email Address', 'fl-builder' ),
64
+ 'preview' => array(
65
+ 'type' => 'none'
66
+ )
67
+ ));
68
+
69
+ return ob_get_clean();
70
+ }
71
+
72
+ /**
73
+ * Render the markup for service specific fields.
74
+ *
75
+ * @since 1.6.0
76
+ * @param string $account The name of the saved account.
77
+ * @param object $settings Saved module settings.
78
+ * @return array {
79
+ * @type bool|string $error The error message or false if no error.
80
+ * @type string $html The field markup.
81
+ * }
82
+ */
83
+ public function render_fields( $account, $settings )
84
+ {
85
+ $response = array(
86
+ 'error' => false,
87
+ 'html' => ''
88
+ );
89
+
90
+ return $response;
91
+ }
92
+
93
+ /**
94
+ * Send the subscription info to the saved email address.
95
+ *
96
+ * @since 1.6.0
97
+ * @param object $settings A module settings object.
98
+ * @param string $email The email to subscribe.
99
+ * @param string $name Optional. The full name of the person subscribing.
100
+ * @return array {
101
+ * @type bool|string $error The error message or false if no error.
102
+ * }
103
+ */
104
+ public function subscribe( $settings, $email, $name = false )
105
+ {
106
+ $account_data = $this->get_account_data( $settings->service_account );
107
+ $response = array( 'error' => false );
108
+
109
+ if ( ! $account_data ) {
110
+ $response['error'] = __( 'There was an error subscribing. The account is no longer connected.', 'fl-builder' );
111
+ }
112
+ else {
113
+
114
+ $subject = __( 'Subscribe Form Signup', 'fl-builder' );
115
+ $message = __( 'Email', 'fl-builder' ) . ': ' . $email;
116
+
117
+ if ( $name ) {
118
+ $message .= "\n" . __( 'Name', 'fl-builder' ) . ': ' . $name;
119
+ }
120
+
121
+ $result = wp_mail( $account_data['email'], $subject, $message );
122
+
123
+ if ( ! $result ) {
124
+ $response['error'] = __( 'There was an error subscribing. Please try again.', 'fl-builder' );
125
+ }
126
+ }
127
+
128
+ return $response;
129
+ }
130
+ }
classes/class-fl-builder-service-mailchimp.php CHANGED
@@ -120,6 +120,7 @@ final class FLBuilderServiceMailChimp extends FLBuilderService {
120
  */
121
  public function render_fields( $account, $settings )
122
  {
 
123
  $account_data = $this->get_account_data( $account );
124
  $api = $this->get_api( $account_data['api_key'] );
125
  $response = array(
@@ -127,14 +128,36 @@ final class FLBuilderServiceMailChimp extends FLBuilderService {
127
  'html' => ''
128
  );
129
 
 
130
  try {
131
- $lists = $api->lists->getList();
132
- $response['html'] = $this->render_list_field( $lists, $settings );
 
 
 
133
  }
134
  catch ( Mailchimp_Error $e ) {
135
  $response['error'] = $e->getMessage();
136
  }
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  return $response;
139
  }
140
 
@@ -159,7 +182,7 @@ final class FLBuilderServiceMailChimp extends FLBuilderService {
159
 
160
  FLBuilder::render_settings_field( 'list_id', array(
161
  'row_class' => 'fl-builder-service-field-row',
162
- 'class' => 'fl-builder-service-list-select',
163
  'type' => 'select',
164
  'label' => _x( 'List', 'An email list from a third party provider.', 'fl-builder' ),
165
  'options' => $options,
@@ -171,6 +194,47 @@ final class FLBuilderServiceMailChimp extends FLBuilderService {
171
  return ob_get_clean();
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  /**
175
  * Subscribe an email address to MailChimp.
176
  *
@@ -198,6 +262,7 @@ final class FLBuilderServiceMailChimp extends FLBuilderService {
198
  $email = array( 'email' => $email );
199
  $data = array();
200
 
 
201
  if ( $name ) {
202
 
203
  $names = explode( ' ', $name );
@@ -210,6 +275,72 @@ final class FLBuilderServiceMailChimp extends FLBuilderService {
210
  }
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  try {
214
  $api->lists->subscribe( $settings->list_id, $email, $data, 'html', (bool) $double, true, false, (bool) $welcome );
215
  }
120
  */
121
  public function render_fields( $account, $settings )
122
  {
123
+ $post_data = FLBuilderModel::get_post_data();
124
  $account_data = $this->get_account_data( $account );
125
  $api = $this->get_api( $account_data['api_key'] );
126
  $response = array(
128
  'html' => ''
129
  );
130
 
131
+ // Lists field
132
  try {
133
+
134
+ if ( ! isset( $post_data['list_id'] ) ) {
135
+ $lists = $api->lists->getList();
136
+ $response['html'] .= $this->render_list_field( $lists, $settings );
137
+ }
138
  }
139
  catch ( Mailchimp_Error $e ) {
140
  $response['error'] = $e->getMessage();
141
  }
142
 
143
+ // Groups field
144
+ try {
145
+
146
+ if ( isset( $post_data['list_id'] ) || isset( $settings->list_id ) ) {
147
+
148
+ if ( isset( $post_data['list_id'] ) ) {
149
+ $list_id = $post_data['list_id'];
150
+ }
151
+ else {
152
+ $list_id = $settings->list_id;
153
+ }
154
+
155
+ $groups = $api->lists->interestGroupings( $list_id );
156
+ $response['html'] .= $this->render_groups_field( $list_id, $groups, $settings );
157
+ }
158
+ }
159
+ catch ( Mailchimp_Error $e ) {}
160
+
161
  return $response;
162
  }
163
 
182
 
183
  FLBuilder::render_settings_field( 'list_id', array(
184
  'row_class' => 'fl-builder-service-field-row',
185
+ 'class' => 'fl-builder-service-list-select fl-builder-mailchimp-list-select',
186
  'type' => 'select',
187
  'label' => _x( 'List', 'An email list from a third party provider.', 'fl-builder' ),
188
  'options' => $options,
194
  return ob_get_clean();
195
  }
196
 
197
+ /**
198
+ * Render markup for the groups field.
199
+ *
200
+ * @since 1.6.0
201
+ * @param string $list_id The ID of the list for this groups.
202
+ * @param array $groups An array of group data.
203
+ * @param object $settings Saved module settings.
204
+ * @return string The markup for the group field.
205
+ * @access private
206
+ */
207
+ private function render_groups_field( $list_id, $groups, $settings )
208
+ {
209
+ if ( ! is_array( $groups ) || 0 === count( $groups ) ) {
210
+ return;
211
+ }
212
+
213
+ ob_start();
214
+
215
+ $options = array( '' => __( 'No Group', 'fl-builder' ) );
216
+
217
+ foreach ( $groups as $group ) {
218
+ foreach ( $group['groups'] as $subgroup ) {
219
+ $options[ $list_id . '_' . $group['id'] . '_' . $subgroup['id'] ] = $group['name'] . ' - ' . $subgroup['name'];
220
+ }
221
+ }
222
+
223
+ FLBuilder::render_settings_field( 'groups', array(
224
+ 'row_class' => 'fl-builder-service-field-row',
225
+ 'class' => 'fl-builder-mailchimp-group-select',
226
+ 'type' => 'select',
227
+ 'label' => _x( 'Groups', 'MailChimp list group.', 'fl-builder' ),
228
+ 'multi-select' => true,
229
+ 'options' => $options,
230
+ 'preview' => array(
231
+ 'type' => 'none'
232
+ )
233
+ ), $settings);
234
+
235
+ return ob_get_clean();
236
+ }
237
+
238
  /**
239
  * Subscribe an email address to MailChimp.
240
  *
262
  $email = array( 'email' => $email );
263
  $data = array();
264
 
265
+ // Name
266
  if ( $name ) {
267
 
268
  $names = explode( ' ', $name );
275
  }
276
  }
277
 
278
+ // Groups
279
+ if ( isset( $settings->groups ) && is_array( $settings->groups ) ) {
280
+
281
+ $groups = array();
282
+
283
+ // Build the array of saved group data.
284
+ for ( $i = 0; $i < count( $settings->groups ); $i++ ) {
285
+
286
+ if ( empty( $settings->groups[ $i ] ) ) {
287
+ continue;
288
+ }
289
+
290
+ $group_data = explode( '_', $settings->groups[ $i ] );
291
+
292
+ if ( $group_data[0] != $settings->list_id ) {
293
+ continue;
294
+ }
295
+ if ( ! isset( $groups[ $group_data[1] ] ) ) {
296
+ $groups[ $group_data[1] ] = array();
297
+ }
298
+
299
+ $groups[ $group_data[1] ][] = $group_data[2];
300
+ }
301
+
302
+ // Get the subgroup names from the API and add to the $data array.
303
+ if ( count( $groups ) > 0 ) {
304
+
305
+ $groups_result = $api->lists->interestGroupings( $settings->list_id );
306
+
307
+ if ( is_array( $groups_result ) && count( $groups_result ) > 0 ) {
308
+
309
+ foreach ( $groups_result as $group ) {
310
+
311
+ if ( ! isset( $groups[ $group['id'] ] ) ) {
312
+ continue;
313
+ }
314
+
315
+ $subgroup_names = array();
316
+
317
+ foreach ( $group['groups'] as $subgroup ) {
318
+
319
+ if ( in_array( $subgroup['id'], $groups[ $group['id'] ] ) ) {
320
+ $subgroup_names[] = $subgroup['name'];
321
+ }
322
+ }
323
+
324
+ if ( 0 === count( $subgroup_names ) ) {
325
+ unset( $groups[ $group['id'] ] );
326
+ }
327
+ else {
328
+ $groups[ $group['id'] ] = $subgroup_names;
329
+ }
330
+ }
331
+
332
+ $i = 0;
333
+
334
+ foreach ( $groups as $group_id => $subgroups ) {
335
+ $data['groupings'][ $i ]['id'] = $group_id;
336
+ $data['groupings'][ $i ]['groups'] = $subgroups;
337
+ $i++;
338
+ }
339
+ }
340
+ }
341
+ }
342
+
343
+ // Subscribe
344
  try {
345
  $api->lists->subscribe( $settings->list_id, $email, $data, 'html', (bool) $double, true, false, (bool) $welcome );
346
  }
classes/class-fl-builder-services.php CHANGED
@@ -15,6 +15,11 @@ final class FLBuilderServices {
15
  * @var array $services_data
16
  */
17
  static private $services_data = array(
 
 
 
 
 
18
  'aweber' => array(
19
  'type' => 'autoresponder',
20
  'name' => 'AWeber',
@@ -30,6 +35,11 @@ final class FLBuilderServices {
30
  'name' => 'Constant Contact',
31
  'class' => 'FLBuilderServiceConstantContact'
32
  ),
 
 
 
 
 
33
  'getresponse' => array(
34
  'type' => 'autoresponder',
35
  'name' => 'GetResponse',
15
  * @var array $services_data
16
  */
17
  static private $services_data = array(
18
+ 'activecampaign' => array(
19
+ 'type' => 'autoresponder',
20
+ 'name' => 'ActiveCampaign',
21
+ 'class' => 'FLBuilderServiceActiveCampaign'
22
+ ),
23
  'aweber' => array(
24
  'type' => 'autoresponder',
25
  'name' => 'AWeber',
35
  'name' => 'Constant Contact',
36
  'class' => 'FLBuilderServiceConstantContact'
37
  ),
38
+ 'email-address' => array(
39
+ 'type' => 'autoresponder',
40
+ 'name' => 'Email Address',
41
+ 'class' => 'FLBuilderServiceEmailAddress'
42
+ ),
43
  'getresponse' => array(
44
  'type' => 'autoresponder',
45
  'name' => 'GetResponse',
classes/class-fl-builder.php CHANGED
@@ -378,8 +378,10 @@ final class FLBuilder {
378
  if(!file_exists($asset_info['css'])) {
379
  FLBuilder::render_css();
380
  }
 
 
381
 
382
- wp_enqueue_style('fl-builder-layout-' . $post_id, $asset_info['css_url'], array(), $asset_ver);
383
 
384
  // Enqueue main JS
385
  if(!file_exists($asset_info['js'])) {
@@ -1529,6 +1531,11 @@ final class FLBuilder {
1529
 
1530
  // Global css
1531
  $css = file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout.css');
 
 
 
 
 
1532
 
1533
  // Responsive css
1534
  if($global_settings->responsive_enabled) {
@@ -1732,18 +1739,54 @@ final class FLBuilder {
1732
  $settings = $row->settings;
1733
  $positions = '';
1734
  $css = '';
1735
-
1736
- if($settings->margin_top != '' || $settings->border_top != '') {
1737
- $positions .= 'top:' . ($settings->margin_top + $settings->border_top) . 'px;';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1738
  }
1739
- if($settings->margin_bottom != ''|| $settings->border_bottom != '') {
1740
- $positions .= 'bottom:' . ($settings->margin_bottom + $settings->border_bottom) . 'px;';
1741
  }
1742
- if($settings->margin_left != ''|| $settings->border_left != '') {
1743
- $positions .= 'left:' . ($settings->margin_left + $settings->border_left) . 'px;';
1744
  }
1745
- if($settings->margin_right != ''|| $settings->border_right != '') {
1746
- $positions .= 'right:' . ($settings->margin_right + $settings->border_right) . 'px;';
1747
  }
1748
  if($positions != '') {
1749
  $css .= '.fl-node-' . $row->node . ' .fl-bg-video {' . $positions . '}';
@@ -1767,17 +1810,20 @@ final class FLBuilder {
1767
  $positions = '';
1768
  $css = '';
1769
 
1770
- if($settings->border_top != '') {
1771
- $positions .= 'top:' . $settings->border_top . 'px;';
1772
- }
1773
- if($settings->border_bottom != '') {
1774
- $positions .= 'bottom:' . $settings->border_bottom . 'px;';
1775
- }
1776
- if($positions != '') {
1777
- $css .= '@media (max-width: '. $global_settings->responsive_breakpoint .'px) { ';
1778
- $css .= '.fl-node-' . $row->node . ' .fl-bg-video {' . $positions . '}';
1779
- $css .= '.fl-node-' . $row->node . ' .fl-bg-slideshow {' . $positions . '}';
1780
- $css .= ' }';
 
 
 
1781
  }
1782
 
1783
  return $css;
378
  if(!file_exists($asset_info['css'])) {
379
  FLBuilder::render_css();
380
  }
381
+
382
+ $deps = apply_filters( 'fl_builder_layout_style_dependencies', array() );
383
 
384
+ wp_enqueue_style('fl-builder-layout-' . $post_id, $asset_info['css_url'], $deps, $asset_ver);
385
 
386
  // Enqueue main JS
387
  if(!file_exists($asset_info['js'])) {
1531
 
1532
  // Global css
1533
  $css = file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout.css');
1534
+
1535
+ // Global RTL css
1536
+ if(is_rtl()) {
1537
+ $css .= file_get_contents(FL_BUILDER_DIR . '/css/fl-builder-layout-rtl.css');
1538
+ }
1539
 
1540
  // Responsive css
1541
  if($global_settings->responsive_enabled) {
1739
  $settings = $row->settings;
1740
  $positions = '';
1741
  $css = '';
1742
+ $top = 0;
1743
+ $bottom = 0;
1744
+ $left = 0;
1745
+ $right = 0;
1746
+
1747
+ // Margins
1748
+ if($settings->margin_top != '') {
1749
+ $top += (int)$settings->margin_top;
1750
+ }
1751
+ if($settings->margin_bottom != '') {
1752
+ $bottom += (int)$settings->margin_bottom;
1753
+ }
1754
+ if($settings->margin_left != '') {
1755
+ $left += (int)$settings->margin_left;
1756
+ }
1757
+ if($settings->margin_right != '') {
1758
+ $right += (int)$settings->margin_right;
1759
+ }
1760
+
1761
+ // Borders
1762
+ if($settings->border_type != '') {
1763
+
1764
+ if($settings->border_top != '') {
1765
+ $top += (int)$settings->border_top;
1766
+ }
1767
+ if($settings->border_bottom != '') {
1768
+ $bottom += (int)$settings->border_bottom;
1769
+ }
1770
+ if($settings->border_left != '') {
1771
+ $left += (int)$settings->border_left;
1772
+ }
1773
+ if($settings->border_right != '') {
1774
+ $right += (int)$settings->border_right;
1775
+ }
1776
+ }
1777
+
1778
+ // CSS
1779
+ if($top > 0) {
1780
+ $positions .= 'top:' . $top . 'px;';
1781
  }
1782
+ if($bottom > 0) {
1783
+ $positions .= 'bottom:' . $bottom . 'px;';
1784
  }
1785
+ if($left > 0) {
1786
+ $positions .= 'left:' . $left . 'px;';
1787
  }
1788
+ if($right > 0) {
1789
+ $positions .= 'right:' . $right . 'px;';
1790
  }
1791
  if($positions != '') {
1792
  $css .= '.fl-node-' . $row->node . ' .fl-bg-video {' . $positions . '}';
1810
  $positions = '';
1811
  $css = '';
1812
 
1813
+ if ($settings->border_type != '') {
1814
+
1815
+ if($settings->border_top != '') {
1816
+ $positions .= 'top:' . $settings->border_top . 'px;';
1817
+ }
1818
+ if($settings->border_bottom != '') {
1819
+ $positions .= 'bottom:' . $settings->border_bottom . 'px;';
1820
+ }
1821
+ if($positions != '') {
1822
+ $css .= '@media (max-width: '. $global_settings->responsive_breakpoint .'px) { ';
1823
+ $css .= '.fl-node-' . $row->node . ' .fl-bg-video {' . $positions . '}';
1824
+ $css .= '.fl-node-' . $row->node . ' .fl-bg-slideshow {' . $positions . '}';
1825
+ $css .= ' }';
1826
+ }
1827
  }
1828
 
1829
  return $css;
css/fl-builder-layout-rtl.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /* Columns
2
+ ------------------------------------------------------ */
3
+
4
+ .fl-col {
5
+ float: right;
6
+ }
css/fl-builder.css CHANGED
@@ -702,6 +702,7 @@ form.fl-builder-settings {
702
  .fl-builder-settings-tabs a {
703
  color: #999;
704
  display: inline-block;
 
705
  padding: 10px 20px;
706
  text-decoration: none;
707
  }
@@ -823,6 +824,9 @@ form.fl-builder-settings {
823
  background: transparent;
824
  border-color: #aaa;
825
  }
 
 
 
826
  .fl-builder-settings-fields ::-webkit-input-placeholder { /* WebKit browsers */
827
  color: #999 !important;
828
  }
702
  .fl-builder-settings-tabs a {
703
  color: #999;
704
  display: inline-block;
705
+ margin: 0;
706
  padding: 10px 20px;
707
  text-decoration: none;
708
  }
824
  background: transparent;
825
  border-color: #aaa;
826
  }
827
+ .fl-builder-settings-fields select[multiple] {
828
+ height: 60px;
829
+ }
830
  .fl-builder-settings-fields ::-webkit-input-placeholder { /* WebKit browsers */
831
  color: #999 !important;
832
  }
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 1.5.9
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
9
  * Copyright: (c) 2014 Beaver Builder
@@ -11,7 +11,7 @@
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
- define('FL_BUILDER_VERSION', '1.5.9');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 1.6.0.1
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
9
  * Copyright: (c) 2014 Beaver Builder
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
+ define('FL_BUILDER_VERSION', '1.6.0.1');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
includes/column-css.php CHANGED
@@ -2,27 +2,72 @@
2
  width: <?php echo $col->settings->size; ?>%;
3
  }
4
 
5
- <?php if(!empty($col->settings->text_color)) : ?>
6
- .fl-node-<?php echo $col->node; ?>,
7
- .fl-node-<?php echo $col->node; ?> a,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  .fl-node-<?php echo $col->node; ?> h1,
9
  .fl-node-<?php echo $col->node; ?> h2,
10
  .fl-node-<?php echo $col->node; ?> h3,
11
  .fl-node-<?php echo $col->node; ?> h4,
12
  .fl-node-<?php echo $col->node; ?> h5,
13
- .fl-node-<?php echo $col->node; ?> h6 {
 
 
 
 
 
 
14
  color: #<?php echo $col->settings->text_color; ?>;
15
  }
16
  <?php endif; ?>
17
 
18
- <?php if($col->settings->bg_type == 'color' && !empty($col->settings->bg_color)) : ?>
19
  .fl-node-<?php echo $col->node; ?> .fl-col-content {
20
  background-color: #<?php echo $col->settings->bg_color; ?>;
21
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($col->settings->bg_color)) ?>, <?php echo $col->settings->bg_opacity/100; ?>);
22
  }
23
  <?php endif; ?>
24
 
25
- <?php if($col->settings->bg_type == 'photo' && !empty($col->settings->bg_image)) : ?>
26
  .fl-node-<?php echo $col->node; ?> .fl-col-content {
27
  background-image: url(<?php echo $col->settings->bg_image_src; ?>);
28
  background-repeat: <?php echo $col->settings->bg_repeat; ?>;
@@ -32,14 +77,14 @@
32
  }
33
  <?php endif; ?>
34
 
35
- <?php if( in_array( $col->settings->bg_type, array('photo') ) && ! empty( $col->settings->bg_overlay_color ) ) : ?>
36
  .fl-node-<?php echo $col->node; ?> .fl-col-content:after {
37
  background-color: #<?php echo $col->settings->bg_overlay_color; ?>;
38
  background-color: rgba(<?php echo implode( ',', FLBuilderColor::hex_to_rgb( $col->settings->bg_overlay_color ) ) ?>, <?php echo $col->settings->bg_overlay_opacity/100; ?>);
39
  }
40
  <?php endif; ?>
41
 
42
- <?php if(!empty($col->settings->border_type)) : ?>
43
  .fl-builder-content .fl-node-<?php echo $col->node; ?> .fl-col-content {
44
  border-style: <?php echo $col->settings->border_type; ?>;
45
  border-color: #<?php echo $col->settings->border_color; ?>;
@@ -51,7 +96,7 @@
51
  }
52
  <?php endif; ?>
53
 
54
- <?php if($global_settings->responsive_enabled) : ?>
55
 
56
  <?php if($col->settings->medium_size == 'custom') : ?>
57
  @media(max-width: <?php echo $global_settings->medium_breakpoint; ?>px) {
2
  width: <?php echo $col->settings->size; ?>%;
3
  }
4
 
5
+ <?php if(!empty($col->settings->text_color)) : // Text Color ?>
6
+ .fl-node-<?php echo $col->node; ?> {
7
+ color: #<?php echo $col->settings->text_color; ?>;
8
+ }
9
+ <?php endif; ?>
10
+
11
+ <?php if(!empty($col->settings->link_color)) : // Link Color ?>
12
+ .fl-node-<?php echo $col->node; ?> a {
13
+ color: #<?php echo $col->settings->link_color; ?>;
14
+ }
15
+ <?php elseif(!empty($col->settings->text_color)) : ?>
16
+ .fl-node-<?php echo $col->node; ?> a {
17
+ color: #<?php echo $col->settings->text_color; ?>;
18
+ }
19
+ <?php endif; ?>
20
+
21
+ <?php if(!empty($col->settings->hover_color)) : // Link Hover Color ?>
22
+ .fl-node-<?php echo $col->node; ?> a:hover {
23
+ color: #<?php echo $col->settings->hover_color; ?>;
24
+ }
25
+ <?php elseif(!empty($col->settings->text_color)) : ?>
26
+ .fl-node-<?php echo $col->node; ?> a:hover {
27
+ color: #<?php echo $col->settings->text_color; ?>;
28
+ }
29
+ <?php endif; ?>
30
+
31
+ <?php if(!empty($col->settings->heading_color)) : // Heading Color ?>
32
+ .fl-node-<?php echo $col->node; ?> h1,
33
+ .fl-node-<?php echo $col->node; ?> h2,
34
+ .fl-node-<?php echo $col->node; ?> h3,
35
+ .fl-node-<?php echo $col->node; ?> h4,
36
+ .fl-node-<?php echo $col->node; ?> h5,
37
+ .fl-node-<?php echo $col->node; ?> h6,
38
+ .fl-node-<?php echo $col->node; ?> h1 a,
39
+ .fl-node-<?php echo $col->node; ?> h2 a,
40
+ .fl-node-<?php echo $col->node; ?> h3 a,
41
+ .fl-node-<?php echo $col->node; ?> h4 a,
42
+ .fl-node-<?php echo $col->node; ?> h5 a,
43
+ .fl-node-<?php echo $col->node; ?> h6 a {
44
+ color: #<?php echo $col->settings->heading_color; ?>;
45
+ }
46
+ <?php elseif(!empty($col->settings->text_color)) : ?>
47
  .fl-node-<?php echo $col->node; ?> h1,
48
  .fl-node-<?php echo $col->node; ?> h2,
49
  .fl-node-<?php echo $col->node; ?> h3,
50
  .fl-node-<?php echo $col->node; ?> h4,
51
  .fl-node-<?php echo $col->node; ?> h5,
52
+ .fl-node-<?php echo $col->node; ?> h6,
53
+ .fl-node-<?php echo $col->node; ?> h1 a,
54
+ .fl-node-<?php echo $col->node; ?> h2 a,
55
+ .fl-node-<?php echo $col->node; ?> h3 a,
56
+ .fl-node-<?php echo $col->node; ?> h4 a,
57
+ .fl-node-<?php echo $col->node; ?> h5 a,
58
+ .fl-node-<?php echo $col->node; ?> h6 a {
59
  color: #<?php echo $col->settings->text_color; ?>;
60
  }
61
  <?php endif; ?>
62
 
63
+ <?php if($col->settings->bg_type == 'color' && !empty($col->settings->bg_color)) : // Background Color ?>
64
  .fl-node-<?php echo $col->node; ?> .fl-col-content {
65
  background-color: #<?php echo $col->settings->bg_color; ?>;
66
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($col->settings->bg_color)) ?>, <?php echo $col->settings->bg_opacity/100; ?>);
67
  }
68
  <?php endif; ?>
69
 
70
+ <?php if($col->settings->bg_type == 'photo' && !empty($col->settings->bg_image)) : // Background Image ?>
71
  .fl-node-<?php echo $col->node; ?> .fl-col-content {
72
  background-image: url(<?php echo $col->settings->bg_image_src; ?>);
73
  background-repeat: <?php echo $col->settings->bg_repeat; ?>;
77
  }
78
  <?php endif; ?>
79
 
80
+ <?php if( in_array( $col->settings->bg_type, array('photo') ) && ! empty( $col->settings->bg_overlay_color ) ) : // Background Overlay Color ?>
81
  .fl-node-<?php echo $col->node; ?> .fl-col-content:after {
82
  background-color: #<?php echo $col->settings->bg_overlay_color; ?>;
83
  background-color: rgba(<?php echo implode( ',', FLBuilderColor::hex_to_rgb( $col->settings->bg_overlay_color ) ) ?>, <?php echo $col->settings->bg_overlay_opacity/100; ?>);
84
  }
85
  <?php endif; ?>
86
 
87
+ <?php if(!empty($col->settings->border_type)) : // Border ?>
88
  .fl-builder-content .fl-node-<?php echo $col->node; ?> .fl-col-content {
89
  border-style: <?php echo $col->settings->border_type; ?>;
90
  border-color: #<?php echo $col->settings->border_color; ?>;
96
  }
97
  <?php endif; ?>
98
 
99
+ <?php if($global_settings->responsive_enabled) : // Responsive Sizes ?>
100
 
101
  <?php if($col->settings->medium_size == 'custom') : ?>
102
  @media(max-width: <?php echo $global_settings->medium_breakpoint; ?>px) {
includes/column-settings.php CHANGED
@@ -32,6 +32,30 @@ FLBuilder::register_settings_form('col', array(
32
  'preview' => array(
33
  'type' => 'none'
34
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  )
36
  )
37
  ),
32
  'preview' => array(
33
  'type' => 'none'
34
  )
35
+ ),
36
+ 'link_color' => array(
37
+ 'type' => 'color',
38
+ 'label' => __('Link Color', 'fl-builder'),
39
+ 'show_reset' => true,
40
+ 'preview' => array(
41
+ 'type' => 'none'
42
+ )
43
+ ),
44
+ 'hover_color' => array(
45
+ 'type' => 'color',
46
+ 'label' => __('Link Hover Color', 'fl-builder'),
47
+ 'show_reset' => true,
48
+ 'preview' => array(
49
+ 'type' => 'none'
50
+ )
51
+ ),
52
+ 'heading_color' => array(
53
+ 'type' => 'color',
54
+ 'label' => __('Heading Color', 'fl-builder'),
55
+ 'show_reset' => true,
56
+ 'preview' => array(
57
+ 'type' => 'none'
58
+ )
59
  )
60
  )
61
  ),
includes/field-editor.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  global $wp_version;
10
 
11
- $editor_id = 'flrich' . time() . '_' . $name;;
12
 
13
  wp_editor($value, $editor_id, array(
14
  'media_buttons' => isset($field['media_buttons']) ? $field['media_buttons'] : true,
8
 
9
  global $wp_version;
10
 
11
+ $editor_id = 'flrich' . time() . '_' . $name;
12
 
13
  wp_editor($value, $editor_id, array(
14
  'media_buttons' => isset($field['media_buttons']) ? $field['media_buttons'] : true,
includes/field-multiple-photos.php CHANGED
@@ -1,17 +1,26 @@
1
- <div class="fl-multiple-photos-field fl-builder-custom-field<?php if(empty($value)) echo ' fl-multiple-photos-empty'; if(isset($field['class'])) echo ' ' . $field['class']; ?>">
2
- <div class="fl-multiple-photos-count">
3
- <?php
4
-
5
- $count = is_array($value) ? count($value) : false;
6
 
7
- if ( $count ) {
8
- printf( _n( '1 Photo Selected', '%d Photos Selected', $count, 'fl-builder' ), $count );
 
 
 
 
 
 
9
  }
10
-
11
- ?>
 
 
 
 
 
 
 
12
  </div>
13
  <a class="fl-multiple-photos-select" href="javascript:void(0);" onclick="return false;"><?php _e('Create Gallery', 'fl-builder'); ?></a>
14
  <a class="fl-multiple-photos-edit" href="javascript:void(0);" onclick="return false;"><?php _e('Edit Gallery', 'fl-builder'); ?></a>
15
  <a class="fl-multiple-photos-add" href="javascript:void(0);" onclick="return false;"><?php _e('Add Photos', 'fl-builder'); ?></a>
16
- <input name="<?php echo $name; ?>" type="hidden" value='<?php if(!empty($value)) echo json_encode($value); ?>' />
17
  </div>
1
+ <?php
 
 
 
 
2
 
3
+ // Normalize the value so we have an array.
4
+ if ( ! empty( $value ) && is_string( $value ) ) {
5
+
6
+ $value = json_decode( $value );
7
+
8
+ // Older versions might be double encoded.
9
+ if ( is_string( $value ) ) {
10
+ $value = json_decode( $value );
11
  }
12
+ }
13
+ else if ( empty( $value ) ) {
14
+ $value = array();
15
+ }
16
+
17
+ ?>
18
+ <div class="fl-multiple-photos-field fl-builder-custom-field<?php if ( empty( $value ) ) echo ' fl-multiple-photos-empty'; if ( isset( $field['class'] ) ) echo ' ' . $field['class']; ?>">
19
+ <div class="fl-multiple-photos-count">
20
+ <?php printf( _n( '1 Photo Selected', '%d Photos Selected', count( $value ), 'fl-builder' ), count( $value ) ); ?>
21
  </div>
22
  <a class="fl-multiple-photos-select" href="javascript:void(0);" onclick="return false;"><?php _e('Create Gallery', 'fl-builder'); ?></a>
23
  <a class="fl-multiple-photos-edit" href="javascript:void(0);" onclick="return false;"><?php _e('Edit Gallery', 'fl-builder'); ?></a>
24
  <a class="fl-multiple-photos-add" href="javascript:void(0);" onclick="return false;"><?php _e('Add Photos', 'fl-builder'); ?></a>
25
+ <input name="<?php echo $name; ?>" type="hidden" value='<?php if ( ! empty( $value ) ) echo json_encode( $value ); ?>' />
26
  </div>
includes/field-select.php CHANGED
@@ -1,15 +1,25 @@
1
- <select name="<?php echo $name; ?>"<?php if(isset($field['class'])) echo ' class="'. $field['class'] .'"'; if(isset($field['toggle'])) echo "data-toggle='". json_encode($field['toggle']) ."'"; if(isset($field['hide'])) echo "data-hide='". json_encode($field['hide']) ."'"; if(isset($field['trigger'])) echo "data-trigger='". json_encode($field['trigger']) ."'"; ?>>
2
  <?php
3
 
4
- foreach($field['options'] as $key => $val) :
5
 
6
- $label = is_array($val) ? $val['label'] : $val;
7
-
8
- if(is_array($val) && isset($val['premium']) && $val['premium'] && FL_BUILDER_LITE === true) {
9
  continue;
10
  }
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ?>
13
- <option value="<?php echo $key; ?>" <?php selected($value, $key); ?>><?php echo $label; ?></option>
14
  <?php endforeach; ?>
15
  </select>
1
+ <select name="<?php echo $name; if(isset($field['multi-select'])) echo '[]'; ?>"<?php if(isset($field['class'])) echo ' class="'. $field['class'] .'"'; if(isset($field['multi-select'])) echo ' multiple '; if(isset($field['toggle'])) echo "data-toggle='". json_encode($field['toggle']) ."'"; if(isset($field['hide'])) echo "data-hide='". json_encode($field['hide']) ."'"; if(isset($field['trigger'])) echo "data-trigger='". json_encode($field['trigger']) ."'"; ?>>
2
  <?php
3
 
4
+ foreach ( $field['options'] as $option_key => $option_val ) :
5
 
6
+ if ( is_array( $option_val ) && isset( $option_val['premium' ] ) && $option_val['premium'] && true === FL_BUILDER_LITE ) {
 
 
7
  continue;
8
  }
9
+
10
+ $label = is_array( $option_val ) ? $option_val['label'] : $option_val;
11
+
12
+ if ( is_array( $value ) && in_array( $option_key, $value ) ) {
13
+ $selected = ' selected="selected"';
14
+ }
15
+ else if ( ! is_array( $value ) && selected( $value, $option_key, true ) ) {
16
+ $selected = ' selected="selected"';
17
+ }
18
+ else {
19
+ $selected = '';
20
+ }
21
 
22
  ?>
23
+ <option value="<?php echo $option_key; ?>" <?php echo $selected; ?>><?php echo $label; ?></option>
24
  <?php endforeach; ?>
25
  </select>
includes/row-css.php CHANGED
@@ -1,24 +1,69 @@
1
- <?php if(!empty($row->settings->text_color)) : ?>
2
- .fl-node-<?php echo $row->node; ?>,
3
- .fl-node-<?php echo $row->node; ?> a,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  .fl-node-<?php echo $row->node; ?> h1,
5
  .fl-node-<?php echo $row->node; ?> h2,
6
  .fl-node-<?php echo $row->node; ?> h3,
7
  .fl-node-<?php echo $row->node; ?> h4,
8
  .fl-node-<?php echo $row->node; ?> h5,
9
- .fl-node-<?php echo $row->node; ?> h6 {
 
 
 
 
 
 
10
  color: #<?php echo $row->settings->text_color; ?>;
11
  }
12
  <?php endif; ?>
13
 
14
- <?php if($row->settings->bg_type == 'color' && !empty($row->settings->bg_color)) : ?>
15
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
16
  background-color: #<?php echo $row->settings->bg_color; ?>;
17
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($row->settings->bg_color)) ?>, <?php echo $row->settings->bg_opacity/100; ?>);
18
  }
19
  <?php endif; ?>
20
 
21
- <?php if($row->settings->bg_type == 'photo' && !empty($row->settings->bg_image)) : ?>
22
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
23
  background-image: url(<?php echo $row->settings->bg_image_src; ?>);
24
  background-repeat: <?php echo $row->settings->bg_repeat; ?>;
@@ -28,14 +73,14 @@
28
  }
29
  <?php endif; ?>
30
 
31
- <?php if( in_array( $row->settings->bg_type, array('photo', 'parallax', 'slideshow', 'video') ) && !empty($row->settings->bg_overlay_color)) : ?>
32
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap:after {
33
  background-color: #<?php echo $row->settings->bg_overlay_color; ?>;
34
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($row->settings->bg_overlay_color)) ?>, <?php echo $row->settings->bg_overlay_opacity/100; ?>);
35
  }
36
  <?php endif; ?>
37
 
38
- <?php if($row->settings->bg_type == 'parallax' && !empty($row->settings->bg_parallax_image_src)) : ?>
39
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
40
  background-repeat: no-repeat;
41
  background-position: center center;
@@ -49,7 +94,7 @@
49
  }
50
  <?php endif; ?>
51
 
52
- <?php if(!empty($row->settings->border_type)) : ?>
53
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
54
  border-style: <?php echo $row->settings->border_type; ?>;
55
  border-color: #<?php echo $row->settings->border_color; ?>;
1
+ <?php if(!empty($row->settings->text_color)) : // Text Color ?>
2
+ .fl-node-<?php echo $row->node; ?> {
3
+ color: #<?php echo $row->settings->text_color; ?>;
4
+ }
5
+ <?php endif; ?>
6
+
7
+ <?php if(!empty($row->settings->link_color)) : // Link Color ?>
8
+ .fl-node-<?php echo $row->node; ?> a {
9
+ color: #<?php echo $row->settings->link_color; ?>;
10
+ }
11
+ <?php elseif(!empty($row->settings->text_color)) : ?>
12
+ .fl-node-<?php echo $row->node; ?> a {
13
+ color: #<?php echo $row->settings->text_color; ?>;
14
+ }
15
+ <?php endif; ?>
16
+
17
+ <?php if(!empty($row->settings->hover_color)) : // Link Hover Color ?>
18
+ .fl-node-<?php echo $row->node; ?> a:hover {
19
+ color: #<?php echo $row->settings->hover_color; ?>;
20
+ }
21
+ <?php elseif(!empty($row->settings->text_color)) : ?>
22
+ .fl-node-<?php echo $row->node; ?> a:hover {
23
+ color: #<?php echo $row->settings->text_color; ?>;
24
+ }
25
+ <?php endif; ?>
26
+
27
+ <?php if(!empty($row->settings->heading_color)) : // Heading Color ?>
28
+ .fl-node-<?php echo $row->node; ?> h1,
29
+ .fl-node-<?php echo $row->node; ?> h2,
30
+ .fl-node-<?php echo $row->node; ?> h3,
31
+ .fl-node-<?php echo $row->node; ?> h4,
32
+ .fl-node-<?php echo $row->node; ?> h5,
33
+ .fl-node-<?php echo $row->node; ?> h6,
34
+ .fl-node-<?php echo $row->node; ?> h1 a,
35
+ .fl-node-<?php echo $row->node; ?> h2 a,
36
+ .fl-node-<?php echo $row->node; ?> h3 a,
37
+ .fl-node-<?php echo $row->node; ?> h4 a,
38
+ .fl-node-<?php echo $row->node; ?> h5 a,
39
+ .fl-node-<?php echo $row->node; ?> h6 a {
40
+ color: #<?php echo $row->settings->heading_color; ?>;
41
+ }
42
+ <?php elseif(!empty($row->settings->text_color)) : ?>
43
  .fl-node-<?php echo $row->node; ?> h1,
44
  .fl-node-<?php echo $row->node; ?> h2,
45
  .fl-node-<?php echo $row->node; ?> h3,
46
  .fl-node-<?php echo $row->node; ?> h4,
47
  .fl-node-<?php echo $row->node; ?> h5,
48
+ .fl-node-<?php echo $row->node; ?> h6,
49
+ .fl-node-<?php echo $row->node; ?> h1 a,
50
+ .fl-node-<?php echo $row->node; ?> h2 a,
51
+ .fl-node-<?php echo $row->node; ?> h3 a,
52
+ .fl-node-<?php echo $row->node; ?> h4 a,
53
+ .fl-node-<?php echo $row->node; ?> h5 a,
54
+ .fl-node-<?php echo $row->node; ?> h6 a {
55
  color: #<?php echo $row->settings->text_color; ?>;
56
  }
57
  <?php endif; ?>
58
 
59
+ <?php if($row->settings->bg_type == 'color' && !empty($row->settings->bg_color)) : // Background Color ?>
60
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
61
  background-color: #<?php echo $row->settings->bg_color; ?>;
62
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($row->settings->bg_color)) ?>, <?php echo $row->settings->bg_opacity/100; ?>);
63
  }
64
  <?php endif; ?>
65
 
66
+ <?php if($row->settings->bg_type == 'photo' && !empty($row->settings->bg_image)) : // Background Photo ?>
67
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
68
  background-image: url(<?php echo $row->settings->bg_image_src; ?>);
69
  background-repeat: <?php echo $row->settings->bg_repeat; ?>;
73
  }
74
  <?php endif; ?>
75
 
76
+ <?php if( in_array( $row->settings->bg_type, array('photo', 'parallax', 'slideshow', 'video') ) && !empty($row->settings->bg_overlay_color)) : // Background Color Overlay ?>
77
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap:after {
78
  background-color: #<?php echo $row->settings->bg_overlay_color; ?>;
79
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($row->settings->bg_overlay_color)) ?>, <?php echo $row->settings->bg_overlay_opacity/100; ?>);
80
  }
81
  <?php endif; ?>
82
 
83
+ <?php if($row->settings->bg_type == 'parallax' && !empty($row->settings->bg_parallax_image_src)) : // Parallax Background ?>
84
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
85
  background-repeat: no-repeat;
86
  background-position: center center;
94
  }
95
  <?php endif; ?>
96
 
97
+ <?php if(!empty($row->settings->border_type)) : // Border ?>
98
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
99
  border-style: <?php echo $row->settings->border_type; ?>;
100
  border-color: #<?php echo $row->settings->border_color; ?>;
includes/row-settings.php CHANGED
@@ -44,12 +44,36 @@ FLBuilder::register_settings_form('row', array(
44
  ),
45
  )
46
  ),
47
- 'text' => array(
48
- 'title' => __('Text', 'fl-builder'),
49
  'fields' => array(
50
  'text_color' => array(
51
  'type' => 'color',
52
- 'label' => __('Color', 'fl-builder'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  'show_reset' => true,
54
  'preview' => array(
55
  'type' => 'none'
44
  ),
45
  )
46
  ),
47
+ 'colors' => array(
48
+ 'title' => __('Colors', 'fl-builder'),
49
  'fields' => array(
50
  'text_color' => array(
51
  'type' => 'color',
52
+ 'label' => __('Text Color', 'fl-builder'),
53
+ 'show_reset' => true,
54
+ 'preview' => array(
55
+ 'type' => 'none'
56
+ )
57
+ ),
58
+ 'link_color' => array(
59
+ 'type' => 'color',
60
+ 'label' => __('Link Color', 'fl-builder'),
61
+ 'show_reset' => true,
62
+ 'preview' => array(
63
+ 'type' => 'none'
64
+ )
65
+ ),
66
+ 'hover_color' => array(
67
+ 'type' => 'color',
68
+ 'label' => __('Link Hover Color', 'fl-builder'),
69
+ 'show_reset' => true,
70
+ 'preview' => array(
71
+ 'type' => 'none'
72
+ )
73
+ ),
74
+ 'heading_color' => array(
75
+ 'type' => 'color',
76
+ 'label' => __('Heading Color', 'fl-builder'),
77
  'show_reset' => true,
78
  'preview' => array(
79
  'type' => 'none'
includes/updater-config.php CHANGED
@@ -3,7 +3,7 @@
3
  if(class_exists('FLUpdater')) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
- 'version' => '1.5.9',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
3
  if(class_exists('FLUpdater')) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
+ 'version' => '1.6.0.1',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
includes/vendor/activecampaign/Account.class.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class AC_Account extends ActiveCampaign {
4
+
5
+ public $version;
6
+ public $url_base;
7
+ public $url;
8
+ public $api_key;
9
+
10
+ function __construct($version, $url_base, $url, $api_key) {
11
+ $this->version = $version;
12
+ $this->url_base = $url_base;
13
+ $this->url = $url;
14
+ $this->api_key = $api_key;
15
+ }
16
+
17
+ function add($params, $post_data) {
18
+ $request_url = "{$this->url}&api_action=account_add&api_output={$this->output}";
19
+ $response = $this->curl($request_url, $post_data);
20
+ return $response;
21
+ }
22
+
23
+ function cancel($params) {
24
+ $request_url = "{$this->url}&api_action=account_cancel&api_output={$this->output}&{$params}";
25
+ $response = $this->curl($request_url);
26
+ return $response;
27
+ }
28
+
29
+ function edit($params, $post_data) {
30
+ $request_url = "{$this->url}&api_action=account_edit&api_output={$this->output}";
31
+ $response = $this->curl($request_url, $post_data);
32
+ return $response;
33
+ }
34
+
35
+ function list_($params) {
36
+ $request_url = "{$this->url}&api_action=account_list&api_output={$this->output}&{$params}";
37
+ $response = $this->curl($request_url);
38
+ return $response;
39
+ }
40
+
41
+ function name_check($params) {
42
+ $request_url = "{$this->url}&api_action=account_name_check&api_output={$this->output}&{$params}";
43
+ $response = $this->curl($request_url);
44
+ return $response;
45
+ }
46
+
47
+ function plans($params) {
48
+ $request_url = "{$this->url}&api_action=account_plans&api_output={$this->output}&{$params}";
49
+ $response = $this->curl($request_url);
50
+ return $response;
51
+ }
52
+
53
+ function status($params) {
54
+ $request_url = "{$this->url}&api_action=account_status&api_output={$this->output}&{$params}";
55
+ $response = $this->curl($request_url);
56
+ return $response;
57
+ }
58
+
59
+ function status_set($params) {
60
+ $request_url = "{$this->url}&api_action=account_status_set&api_output={$this->output}&{$params}";
61
+ $response = $this->curl($request_url);
62
+ return $response;
63
+ }
64
+
65
+ function view() {
66
+ $request_url = "{$this->url}&api_action=account_view&api_output={$this->output}";
67
+ $response = $this->curl($request_url);
68
+ return $response;
69
+ }
70
+
71
+ }
72
+
73
+ ?>
includes/vendor/activecampaign/ActiveCampaign.class.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !defined("ACTIVECAMPAIGN_URL") || (!defined("ACTIVECAMPAIGN_API_KEY") && !defined("ACTIVECAMPAIGN_API_USER") && !defined("ACTIVECAMPAIGN_API_PASS")) ) {
4
+ require_once(dirname(__FILE__) . "/config.php");
5
+ }
6
+
7
+ require_once("Connector.class.php");
8
+
9
+ class ActiveCampaign extends AC_Connector {
10
+
11
+ public $url_base;
12
+ public $url;
13
+ public $api_key;
14
+ public $track_email;
15
+ public $track_actid;
16
+ public $track_key;
17
+ public $version = 1;
18
+ public $debug = false;
19
+
20
+ function __construct($url, $api_key, $api_user = "", $api_pass = "") {
21
+ $this->url_base = $this->url = $url;
22
+ $this->api_key = $api_key;
23
+ parent::__construct($url, $api_key, $api_user, $api_pass);
24
+ }
25
+
26
+ function version($version) {
27
+ $this->version = (int)$version;
28
+ if ($version == 2) {
29
+ $this->url_base = $this->url_base . "/2";
30
+ }
31
+ }
32
+
33
+ function api($path, $post_data = array()) {
34
+ // IE: "contact/view"
35
+ $components = explode("/", $path);
36
+ $component = $components[0];
37
+
38
+ if (count($components) > 2) {
39
+ // IE: "contact/tag/add?whatever"
40
+ // shift off the first item (the component, IE: "contact").
41
+ array_shift($components);
42
+ // IE: convert to "tag_add?whatever"
43
+ $method_str = implode("_", $components);
44
+ $components = array($component, $method_str);
45
+ }
46
+
47
+ if (preg_match("/\?/", $components[1])) {
48
+ // query params appended to method
49
+ // IE: contact/edit?overwrite=0
50
+ $method_arr = explode("?", $components[1]);
51
+ $method = $method_arr[0];
52
+ $params = $method_arr[1];
53
+ }
54
+ else {
55
+ // just a method provided
56
+ // IE: "contact/view
57
+ if ( isset($components[1]) ) {
58
+ $method = $components[1];
59
+ $params = "";
60
+ }
61
+ else {
62
+ return "Invalid method.";
63
+ }
64
+ }
65
+
66
+ // adjustments
67
+ if ($component == "list") {
68
+ // reserved word
69
+ $component = "list_";
70
+ }
71
+ elseif ($component == "branding") {
72
+ $component = "design";
73
+ }
74
+ elseif ($component == "sync") {
75
+ $component = "contact";
76
+ $method = "sync";
77
+ }
78
+ elseif ($component == "singlesignon") {
79
+ $component = "auth";
80
+ }
81
+
82
+ $class = ucwords($component); // IE: "contact" becomes "Contact"
83
+ $class = "AC_" . $class;
84
+ // IE: new Contact();
85
+
86
+ $add_tracking = false;
87
+ if ($class == "AC_Tracking") $add_tracking = true;
88
+
89
+ $class = new $class($this->version, $this->url_base, $this->url, $this->api_key);
90
+ // IE: $contact->view()
91
+
92
+ if ($add_tracking) {
93
+ $class->track_email = $this->track_email;
94
+ $class->track_actid = $this->track_actid;
95
+ $class->track_key = $this->track_key;
96
+ }
97
+
98
+ if ($method == "list") {
99
+ // reserved word
100
+ $method = "list_";
101
+ }
102
+
103
+ $class->debug = $this->debug;
104
+
105
+ $response = $class->$method($params, $post_data);
106
+ return $response;
107
+ }
108
+
109
+ }
110
+
111
+ require_once("Account.class.php");
112
+ require_once("Auth.class.php");
113
+ require_once("Automation.class.php");
114
+ require_once("Campaign.class.php");
115
+ require_once("Contact.class.php");
116
+ require_once("Deal.class.php");
117
+ require_once("Design.class.php");
118
+ require_once("Form.class.php");
119
+ require_once("Group.class.php");
120
+ require_once("List.class.php");
121
+ require_once("Message.class.php");
122
+ require_once("Settings.class.php");
123
+ require_once("Subscriber.class.php");
124
+ require_once("Tracking.class.php");
125
+ require_once("User.class.php");
126
+ require_once("Webhook.class.php");
127
+
128
+ ?>
includes/vendor/activecampaign/Auth.class.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class AC_Auth extends ActiveCampaign {
4
+
5
+ public $version;
6
+ public $url_base;
7
+ public $url;
8
+ public $api_key;
9
+
10
+ function __construct($version, $url_base, $url, $api_key) {
11
+ $this->version = $version;
12
+ $this->url_base = $url_base;
13
+ $this->url = $url;
14
+ $this->api_key = $api_key;
15
+ }
16
+
17
+ function singlesignon($params) {
18
+ $request_url = "{$this->url}&api_action=singlesignon&api_output={$this->output}&{$params}";
19
+ $response = $this->curl($request_url);
20
+ return $response;
21
+ }
22
+
23
+ }
24
+
25
+ ?>
includes/vendor/activecampaign/Automation.class.php ADDED
@@ -0,0 +1,51 @@