Version Description
- Update copyright information.
- Remove Form Options for users who aren't connected to Constant Contact.
- Clean up API fields.
Download this release
Release Info
Developer | constantcontact |
Plugin | Constant Contact Forms |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- constant-contact-forms.php +2 -2
- includes/class-api.php +1 -1
- includes/class-builder-fields.php +33 -17
- languages/constant-contact-forms.pot +38 -48
- readme.txt +5 -0
constant-contact-forms.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Constant Contact Forms for WordPress
|
13 |
* Plugin URI: https://www.constantcontact.com
|
14 |
* Description: Be a better marketer. All it takes is Constant Contact email marketing.
|
15 |
-
* Version: 1.0.
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com
|
18 |
* License: GPLv3
|
@@ -27,7 +27,7 @@
|
|
27 |
*/
|
28 |
|
29 |
/**
|
30 |
-
* Copyright (c) 2016 Constant Contact (email :
|
31 |
*
|
32 |
* This program is free software: you can redistribute it and/or modify
|
33 |
* it under the terms of the GNU General Public License as published by
|
12 |
* Plugin Name: Constant Contact Forms for WordPress
|
13 |
* Plugin URI: https://www.constantcontact.com
|
14 |
* Description: Be a better marketer. All it takes is Constant Contact email marketing.
|
15 |
+
* Version: 1.0.2
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com
|
18 |
* License: GPLv3
|
27 |
*/
|
28 |
|
29 |
/**
|
30 |
+
* Copyright (c) 2016 Constant Contact (email : legal@constantcontact.com)
|
31 |
*
|
32 |
* This program is free software: you can redistribute it and/or modify
|
33 |
* it under the terms of the GNU General Public License as published by
|
includes/class-api.php
CHANGED
@@ -626,7 +626,7 @@ class ConstantContact_API {
|
|
626 |
|
627 |
// If we have our debugging turned on, push that error to the error log
|
628 |
if ( defined( 'CONSTANT_CONTACT_DEBUG' ) && CONSTANT_CONTACT_DEBUG ) {
|
629 |
-
error_log( $error->error_key );
|
630 |
error_log( serialize( debug_backtrace() ) );
|
631 |
}
|
632 |
|
626 |
|
627 |
// If we have our debugging turned on, push that error to the error log
|
628 |
if ( defined( 'CONSTANT_CONTACT_DEBUG' ) && CONSTANT_CONTACT_DEBUG ) {
|
629 |
+
error_log( $error->error_key . ': ' . $error->error_message );
|
630 |
error_log( serialize( debug_backtrace() ) );
|
631 |
}
|
632 |
|
includes/class-builder-fields.php
CHANGED
@@ -108,23 +108,28 @@ class ConstantContact_Builder_Fields {
|
|
108 |
* @return void
|
109 |
*/
|
110 |
public function opt_ins_metabox() {
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
'context' => 'normal',
|
118 |
-
'priority' => 'high',
|
119 |
-
'show_names' => true,
|
120 |
-
) );
|
121 |
-
|
122 |
-
// Depending on if we're connected or not, show different opt-in fields
|
123 |
if ( constant_contact()->api->is_connected() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
$this->show_optin_connected_fields( $options_metabox );
|
125 |
-
}
|
|
|
|
|
126 |
$this->show_optin_not_connected_fields( $options_metabox );
|
127 |
-
}
|
128 |
}
|
129 |
|
130 |
/**
|
@@ -248,7 +253,13 @@ class ConstantContact_Builder_Fields {
|
|
248 |
// Custom CMB2 fields.
|
249 |
$fields_metabox->add_field( array(
|
250 |
'name' => __( 'Add Fields', 'constant-contact-forms' ),
|
251 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
'id' => $this->prefix . 'title',
|
253 |
'type' => 'title',
|
254 |
) );
|
@@ -291,8 +302,13 @@ class ConstantContact_Builder_Fields {
|
|
291 |
'job_title' => __( 'Job Title', 'constant-contact-forms' ),
|
292 |
'company' => __( 'Company', 'constant-contact-forms' ),
|
293 |
'website' => __( 'Website', 'constant-contact-forms' ),
|
294 |
-
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
296 |
'custom' => __( 'Custom Text Field', 'constant-contact-forms' ),
|
297 |
'custom_text_area' => __( 'Custom Text Area', 'constant-contact-forms' ),
|
298 |
) );
|
108 |
* @return void
|
109 |
*/
|
110 |
public function opt_ins_metabox() {
|
111 |
+
/**
|
112 |
+
* Only connected users will get the Form Options. This may change
|
113 |
+
* in the future, leaving the old code here for posterity.
|
114 |
+
* @todo
|
115 |
+
* @since 1.0.2
|
116 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
if ( constant_contact()->api->is_connected() ) {
|
118 |
+
$options_metabox = new_cmb2_box( array(
|
119 |
+
'id' => 'ctct_1_optin_metabox',
|
120 |
+
'title' => __( 'Form Options', 'constant-contact-forms' ),
|
121 |
+
'object_types' => array( 'ctct_forms' ),
|
122 |
+
'context' => 'normal',
|
123 |
+
'priority' => 'high',
|
124 |
+
'show_names' => true,
|
125 |
+
) );
|
126 |
+
|
127 |
$this->show_optin_connected_fields( $options_metabox );
|
128 |
+
}/**
|
129 |
+
* Same as the block above.
|
130 |
+
else {
|
131 |
$this->show_optin_not_connected_fields( $options_metabox );
|
132 |
+
}*/
|
133 |
}
|
134 |
|
135 |
/**
|
253 |
// Custom CMB2 fields.
|
254 |
$fields_metabox->add_field( array(
|
255 |
'name' => __( 'Add Fields', 'constant-contact-forms' ),
|
256 |
+
/**
|
257 |
+
* No birthdays or anniversarys in CC API V2, keeping this for later.
|
258 |
+
* "You can also collect birthday and anniversary dates to use with Constant Contact autoresponders! "
|
259 |
+
* @todo
|
260 |
+
* @since 1.0.2
|
261 |
+
*/
|
262 |
+
'description' => __( 'Create a field for each piece of information you want to collect. Good basics include email address, first name, and last name.', 'constant-contact-forms' ),
|
263 |
'id' => $this->prefix . 'title',
|
264 |
'type' => 'title',
|
265 |
) );
|
302 |
'job_title' => __( 'Job Title', 'constant-contact-forms' ),
|
303 |
'company' => __( 'Company', 'constant-contact-forms' ),
|
304 |
'website' => __( 'Website', 'constant-contact-forms' ),
|
305 |
+
/**
|
306 |
+
* V2 of the CC API doesn't support these fields. Hopefully this will get sorted out.
|
307 |
+
* 'birthday' => __( 'Birthday', 'constant-contact-forms' ),
|
308 |
+
* 'anniversary' => __( 'Anniversary', 'constant-contact-forms' ),
|
309 |
+
* @todo
|
310 |
+
* @since 1.0.2
|
311 |
+
*/
|
312 |
'custom' => __( 'Custom Text Field', 'constant-contact-forms' ),
|
313 |
'custom_text_area' => __( 'Custom Text Area', 'constant-contact-forms' ),
|
314 |
) );
|
languages/constant-contact-forms.pot
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
# This file is distributed under the same license as the Constant Contact Forms for WordPress package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Constant Contact Forms for WordPress 1.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/constant-contact-"
|
7 |
"forms\n"
|
8 |
-
"POT-Creation-Date: 2016-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
16 |
-
#. #-#-#-#-# constant-contact-forms.pot (Constant Contact Forms for WordPress 1.0.
|
17 |
#. Author of the plugin/theme
|
18 |
#: constant-contact-forms.php:201 includes/class-builder.php:309
|
19 |
#: includes/class-cpts.php:93 includes/class-cpts.php:151
|
@@ -257,145 +257,135 @@ msgid ""
|
|
257 |
"coupons, and more."
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: includes/class-builder-fields.php:
|
261 |
msgid "Form Options"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: includes/class-builder-fields.php:
|
265 |
msgid "Add subscribers to"
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: includes/class-builder-fields.php:
|
269 |
msgid "No List Selected"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: includes/class-builder-fields.php:
|
273 |
msgid "Enable email subscriber opt-in"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: includes/class-builder-fields.php:
|
277 |
msgid "Adds an opt-in to the bottom of your form."
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: includes/class-builder-fields.php:
|
281 |
msgid "Show opt-in checkbox to allow visitors to opt-in to your email list."
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: includes/class-builder-fields.php:
|
285 |
msgid "(usually used with a Contact Us type form)"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: includes/class-builder-fields.php:
|
289 |
msgid "Show Opt-in checkbox"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: includes/class-builder-fields.php:
|
293 |
msgid "Your Business Name"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: includes/class-builder-fields.php:
|
297 |
msgid "Opt-in Affirmation"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: includes/class-builder-fields.php:
|
301 |
msgid ""
|
302 |
"Example: Yes, I would like to receive emails from %s. (You can unsubscribe "
|
303 |
"anytime)"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: includes/class-builder-fields.php:
|
307 |
msgid "Form Fields"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: includes/class-builder-fields.php:
|
311 |
msgid "Add Fields"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: includes/class-builder-fields.php:
|
315 |
msgid ""
|
316 |
"Create a field for each piece of information you want to collect. Good "
|
317 |
-
"basics include email address, first name, and last name.
|
318 |
-
"collect birthday and anniversary dates to use with Constant Contact "
|
319 |
-
"autoresponders! "
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: includes/class-builder-fields.php:
|
323 |
msgid "Field {#}"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: includes/class-builder-fields.php:
|
327 |
msgid "Add Another Field"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: includes/class-builder-fields.php:
|
331 |
msgid "Remove Field"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: includes/class-builder-fields.php:
|
335 |
msgid "Field Label"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: includes/class-builder-fields.php:
|
339 |
msgid "Email"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: includes/class-builder-fields.php:
|
343 |
msgid "Field Description"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: includes/class-builder-fields.php:
|
347 |
msgid "Email (required)"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: includes/class-builder-fields.php:
|
351 |
msgid "First Name"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: includes/class-builder-fields.php:
|
355 |
msgid "Last Name"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: includes/class-builder-fields.php:
|
359 |
msgid "Phone Number"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: includes/class-builder-fields.php:
|
363 |
msgid "Address"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: includes/class-builder-fields.php:
|
367 |
msgid "Job Title"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: includes/class-builder-fields.php:
|
371 |
msgid "Company"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: includes/class-builder-fields.php:
|
375 |
msgid "Website"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: includes/class-builder-fields.php:
|
379 |
-
msgid "Birthday"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: includes/class-builder-fields.php:295
|
383 |
-
msgid "Anniversary"
|
384 |
-
msgstr ""
|
385 |
-
|
386 |
-
#: includes/class-builder-fields.php:296
|
387 |
msgid "Custom Text Field"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: includes/class-builder-fields.php:
|
391 |
msgid "Custom Text Area"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: includes/class-builder-fields.php:
|
395 |
msgid "Select a Field"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: includes/class-builder-fields.php:
|
399 |
msgid "Required"
|
400 |
msgstr ""
|
401 |
|
@@ -1227,9 +1217,9 @@ msgstr ""
|
|
1227 |
msgid "Constant Contact Forms for WordPress"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#. #-#-#-#-# constant-contact-forms.pot (Constant Contact Forms for WordPress 1.0.
|
1231 |
#. Plugin URI of the plugin/theme
|
1232 |
-
#. #-#-#-#-# constant-contact-forms.pot (Constant Contact Forms for WordPress 1.0.
|
1233 |
#. Author URI of the plugin/theme
|
1234 |
msgid "https://www.constantcontact.com"
|
1235 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Constant Contact Forms for WordPress package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Constant Contact Forms for WordPress 1.0.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/constant-contact-"
|
7 |
"forms\n"
|
8 |
+
"POT-Creation-Date: 2016-10-07 13:25:47+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
16 |
+
#. #-#-#-#-# constant-contact-forms.pot (Constant Contact Forms for WordPress 1.0.2) #-#-#-#-#
|
17 |
#. Author of the plugin/theme
|
18 |
#: constant-contact-forms.php:201 includes/class-builder.php:309
|
19 |
#: includes/class-cpts.php:93 includes/class-cpts.php:151
|
257 |
"coupons, and more."
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: includes/class-builder-fields.php:120
|
261 |
msgid "Form Options"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: includes/class-builder-fields.php:152 includes/class-settings.php:235
|
265 |
msgid "Add subscribers to"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: includes/class-builder-fields.php:155
|
269 |
msgid "No List Selected"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: includes/class-builder-fields.php:178
|
273 |
msgid "Enable email subscriber opt-in"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: includes/class-builder-fields.php:180
|
277 |
msgid "Adds an opt-in to the bottom of your form."
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: includes/class-builder-fields.php:200
|
281 |
msgid "Show opt-in checkbox to allow visitors to opt-in to your email list."
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: includes/class-builder-fields.php:202
|
285 |
msgid "(usually used with a Contact Us type form)"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: includes/class-builder-fields.php:205
|
289 |
msgid "Show Opt-in checkbox"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: includes/class-builder-fields.php:223
|
293 |
msgid "Your Business Name"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: includes/class-builder-fields.php:226 includes/class-settings.php:256
|
297 |
msgid "Opt-in Affirmation"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: includes/class-builder-fields.php:229
|
301 |
msgid ""
|
302 |
"Example: Yes, I would like to receive emails from %s. (You can unsubscribe "
|
303 |
"anytime)"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: includes/class-builder-fields.php:246
|
307 |
msgid "Form Fields"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: includes/class-builder-fields.php:255
|
311 |
msgid "Add Fields"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/class-builder-fields.php:262
|
315 |
msgid ""
|
316 |
"Create a field for each piece of information you want to collect. Good "
|
317 |
+
"basics include email address, first name, and last name."
|
|
|
|
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: includes/class-builder-fields.php:273
|
321 |
msgid "Field {#}"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: includes/class-builder-fields.php:274
|
325 |
msgid "Add Another Field"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: includes/class-builder-fields.php:275
|
329 |
msgid "Remove Field"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: includes/class-builder-fields.php:282
|
333 |
msgid "Field Label"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: includes/class-builder-fields.php:285
|
337 |
msgid "Email"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: includes/class-builder-fields.php:290
|
341 |
msgid "Field Description"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/class-builder-fields.php:297
|
345 |
msgid "Email (required)"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: includes/class-builder-fields.php:298
|
349 |
msgid "First Name"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/class-builder-fields.php:299
|
353 |
msgid "Last Name"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/class-builder-fields.php:300
|
357 |
msgid "Phone Number"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: includes/class-builder-fields.php:301
|
361 |
msgid "Address"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: includes/class-builder-fields.php:302
|
365 |
msgid "Job Title"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: includes/class-builder-fields.php:303
|
369 |
msgid "Company"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: includes/class-builder-fields.php:304
|
373 |
msgid "Website"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: includes/class-builder-fields.php:312
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
msgid "Custom Text Field"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: includes/class-builder-fields.php:313
|
381 |
msgid "Custom Text Area"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/class-builder-fields.php:318
|
385 |
msgid "Select a Field"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/class-builder-fields.php:329
|
389 |
msgid "Required"
|
390 |
msgstr ""
|
391 |
|
1217 |
msgid "Constant Contact Forms for WordPress"
|
1218 |
msgstr ""
|
1219 |
|
1220 |
+
#. #-#-#-#-# constant-contact-forms.pot (Constant Contact Forms for WordPress 1.0.2) #-#-#-#-#
|
1221 |
#. Plugin URI of the plugin/theme
|
1222 |
+
#. #-#-#-#-# constant-contact-forms.pot (Constant Contact Forms for WordPress 1.0.2) #-#-#-#-#
|
1223 |
#. Author URI of the plugin/theme
|
1224 |
msgid "https://www.constantcontact.com"
|
1225 |
msgstr ""
|
readme.txt
CHANGED
@@ -31,6 +31,11 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
|
|
31 |
|
32 |
== Changelog ==
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
= 1.0.1 =
|
35 |
* Fixed: issue with PHP 5.5+ syntax when we need 5.4+
|
36 |
* Added: Prevention of plugin loading for users below PHP version 5.4 to avoid incompatibility issues.
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 1.0.2 =
|
35 |
+
* Update copyright information.
|
36 |
+
* Remove Form Options for users who aren't connected to Constant Contact.
|
37 |
+
* Clean up API fields.
|
38 |
+
|
39 |
= 1.0.1 =
|
40 |
* Fixed: issue with PHP 5.5+ syntax when we need 5.4+
|
41 |
* Added: Prevention of plugin loading for users below PHP version 5.4 to avoid incompatibility issues.
|