Version Description
- Fixed: Customized labels no longer reset to default when adding new fields.
- Added: Ability to bypass using WP_CRON when trying to have form entries sent to ConstantContact.com lists. If you're having trouble getting them sent, use this setting.
- Updated: Revised content for "Disconnect" page when connected, and have not created a form yet.
Download this release
Release Info
Developer | constantcontact |
Plugin | Constant Contact Forms |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.4 to 1.2.5
- assets/css/admin-global-no-connection.css +45 -0
- assets/js/ctct-plugin-admin.js +25 -2
- assets/js/ctct-plugin-admin.min.js +1 -1
- assets/js/ctct-plugin-admin/ajax.js +21 -0
- assets/js/ctct-plugin-admin/builder.js +4 -2
- assets/sass/admin-global-no-connection.scss +256 -200
- constant-contact-forms.php +2 -2
- includes/class-connect.php +34 -10
- includes/class-mail.php +12 -9
- includes/class-process-form.php +6 -0
- includes/class-settings.php +9 -0
- includes/helper-functions.php +17 -0
- readme.txt +6 -1
assets/css/admin-global-no-connection.css
CHANGED
@@ -247,6 +247,51 @@
|
|
247 |
background-color: #005990;
|
248 |
}
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
.error {
|
251 |
background: none !important;
|
252 |
border-left: 1px solid #FF4136 !important;
|
247 |
background-color: #005990;
|
248 |
}
|
249 |
|
250 |
+
.ctct_options_connect .ctct-body .ctct-connected .ctct-connected-next-step {
|
251 |
+
margin-bottom: 40px;
|
252 |
+
}
|
253 |
+
|
254 |
+
.ctct_options_connect .ctct-body .ctct-connected .ctct-connected-next-step h3 {
|
255 |
+
color: #2ECC40;
|
256 |
+
}
|
257 |
+
|
258 |
+
.ctct_options_connect .ctct-body .ctct-connected .ctct-disconnect-text {
|
259 |
+
float: left;
|
260 |
+
margin-bottom: 50px;
|
261 |
+
overflow: hidden;
|
262 |
+
text-align: left;
|
263 |
+
}
|
264 |
+
|
265 |
+
.ctct_options_connect .ctct-body .ctct-connected form {
|
266 |
+
float: right;
|
267 |
+
}
|
268 |
+
|
269 |
+
.ctct_options_connect .ctct-body .ctct-connected .button {
|
270 |
+
color: #0078C3;
|
271 |
+
}
|
272 |
+
|
273 |
+
.ctct_options_connect .ctct-body .ctct-connected .button.button-blue {
|
274 |
+
color: #fff;
|
275 |
+
}
|
276 |
+
|
277 |
+
.ctct_options_connect .ctct-body .ctct-connected .ctct-connected-next-step {
|
278 |
+
clear: both;
|
279 |
+
}
|
280 |
+
|
281 |
+
.ctct_options_connect .ctct-body .ctct-connected .ctct-connect-ga-optin {
|
282 |
+
margin-top: 15px;
|
283 |
+
}
|
284 |
+
|
285 |
+
@media screen and (max-width: 782px) {
|
286 |
+
.ctct_options_connect .ctct-body .ctct-connected .ctct-disconnect-text {
|
287 |
+
float: none;
|
288 |
+
text-align: center;
|
289 |
+
}
|
290 |
+
.ctct_options_connect .ctct-body .ctct-connected form {
|
291 |
+
float: none;
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
.error {
|
296 |
background: none !important;
|
297 |
border-left: 1px solid #FF4136 !important;
|
assets/js/ctct-plugin-admin.js
CHANGED
@@ -30,6 +30,27 @@ window.CTCTAJAX = {};
|
|
30 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
31 |
});
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
$('#_ctct_data_tracking').on('click', function(e) {
|
34 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
35 |
});
|
@@ -258,8 +279,10 @@ window.CTCTBuilder = {};
|
|
258 |
$fieldTitle.text( $mapName );
|
259 |
|
260 |
// If we have a blank field label, then use the name of the field to fill it in
|
261 |
-
if (
|
262 |
-
$labelField.val(
|
|
|
|
|
263 |
}
|
264 |
|
265 |
// If we haven't yet found an email field, and this is our email field
|
30 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
31 |
});
|
32 |
|
33 |
+
$('#ctct-connect-ga-optin a').on('click', function (e) {
|
34 |
+
var ctct_optin_ajax = {
|
35 |
+
'action': 'constant_contact_optin_ajax_handler',
|
36 |
+
'optin' : $(this).attr('data-allow')
|
37 |
+
}
|
38 |
+
|
39 |
+
$.ajax({
|
40 |
+
url : ajaxurl,
|
41 |
+
data : ctct_optin_ajax,
|
42 |
+
dataType: 'json',
|
43 |
+
success : function (response) {
|
44 |
+
$('.ctct-connected-opt-in').hide();
|
45 |
+
},
|
46 |
+
error : function (x, t, m) {
|
47 |
+
if (window.console) {
|
48 |
+
console.log([t, m]);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
});
|
52 |
+
});
|
53 |
+
|
54 |
$('#_ctct_data_tracking').on('click', function(e) {
|
55 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
56 |
});
|
279 |
$fieldTitle.text( $mapName );
|
280 |
|
281 |
// If we have a blank field label, then use the name of the field to fill it in
|
282 |
+
if ($labelField.val().length === 0) {
|
283 |
+
$labelField.val($mapName).addClass('ctct-label-filled');
|
284 |
+
} else {
|
285 |
+
$labelField.addClass('ctct-label-filled');
|
286 |
}
|
287 |
|
288 |
// If we haven't yet found an email field, and this is our email field
|
assets/js/ctct-plugin-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.CTCTAJAX={},function(t,
|
1 |
+
window.CTCTAJAX={},function(t,n,c){c.init=function(){c.handleOptinAJAX(),c.handleReviewAJAX()},c.handleOptinAJAX=function(){n("#ctct_admin_notice_tracking_optin").on("click",function(c){var e={action:"constant_contact_optin_ajax_handler",optin:n(this).is(":checked")?"on":"off"};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){},error:function(n,c,e){t.console&&console.log([c,e])}}),n("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),n("#ctct-connect-ga-optin a").on("click",function(c){var e={action:"constant_contact_optin_ajax_handler",optin:n(this).attr("data-allow")};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){n(".ctct-connected-opt-in").hide()},error:function(n,c,e){t.console&&console.log([c,e])}})}),n("#_ctct_data_tracking").on("click",function(t){n("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),n(".ctct-modal-close").on("click",function(t){n("#_ctct_data_tracking").is(":checked")&&n("#_ctct_data_tracking").attr("checked",!1)}),n("#ctct-modal-footer-privacy a").on("click",function(c){var e={action:"constant_contact_privacy_ajax_handler",privacy_agree:n(this).attr("data-agree")};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){n("#ctct-privacy-modal").toggleClass("ctct-modal-open"),"false"===e.privacy_agree&&n("#_ctct_data_tracking").is(":checked")&&n("#_ctct_data_tracking").attr("checked",!1)},error:function(n,c,e){t.console&&console.log([c,e])}})})},c.handleReviewAJAX=function(){n("#ctct-admin-notice-review_request").on("click","a",function(c){var e="dismissed";n(this).hasClass("ctct-review")&&(e="reviewed");var o={action:"constant_contact_review_ajax_handler","ctct-review-action":e};n.ajax({url:ajaxurl,data:o,dataType:"json",success:function(e){t.console&&console.log(e),c.preventDefault(),n("#ctct-admin-notice-review_request").hide()},error:function(n,c,e){t.console&&console.log([c,e])}})})},n(c.init)}(window,jQuery,window.CTCTAJAX),window.CTCTBuilder={},function(t,n,c){c.init=function(){n("#cmb2-metabox-ctct_2_fields_metabox option[value='email']:selected").length&&n("#ctct-no-email-error").remove(),c.cache(),c.bindEvents(),c.selectBinds(),c.modifyFields(),n("#ctct_0_description_metabox h2.hndle").removeClass("ui-sortable-handle, hndle"),n("head").append('<style> #cmb2-metabox-ctct_2_fields_metabox a.move-up::after { content: "'+ctct_texts.move_up+'" } #cmb2-metabox-ctct_2_fields_metabox a.move-down::after { content: "'+ctct_texts.move_down+'" }</style>')},c.cache=function(){c.$c={window:n(t),body:n("body")},c.isLeaveWarningBound=!1},c.bindLeaveWarning=function(){c.isLeaveWarningBound||(n(t).bind("beforeunload",function(){return ctct_texts.leavewarning}),c.isLeaveWarningBound=!0)},c.unbindLeaveWarning=function(){n(t).unbind("beforeunload")},c.bindEvents=function(){n("#post").submit(function(){n(".ctct-email-disabled").removeClass("disabled").prop("disabled",!1),c.unbindLeaveWarning()}),n(".cmb2-wrap input, .cmb2-wrap textarea").on("input",function(){"undefined"!=typeof tinyMCE&&c.bindLeaveWarning()}),n(document).on("cmb2_shift_rows_complete",function(){c.modifyFields(),c.bindLeaveWarning(),c.removeDuplicateMappings()}),n(document).on("cmb2_add_row",function(t){n("#custom_fields_group_repeat .postbox").last().find(".map select").val("none"),c.modifyFields(),c.selectBinds(),c.removeDuplicateMappings()}),c.removeDuplicateMappings()},c.selectBinds=function(){n("#cmb2-metabox-ctct_2_fields_metabox .cmb2_select").change(function(){c.modifyFields(),c.removeDuplicateMappings(),c.bindLeaveWarning()})},c.modifyFields=function(){var c=!1;n("#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping").each(function(e,o){var i=n(this).find(".cmb-field-list"),a=n(i).find(".cmb-remove-group-row"),s=n(i).find(".required input[type=checkbox]"),l=s.closest(".cmb-row"),d=n(i).find(".map select option:selected"),r=d.text(),u=n(this).find("h3"),_=n(this).find("input[name*='_ctct_field_label']"),p=n(this).find("input[name*='_ctct_field_desc']");if(u.text(r),0===_.val().length?_.val(r).addClass("ctct-label-filled"):_.addClass("ctct-label-filled"),c||"email"!==n(d).val()?(n(o).find("select").removeClass("disabled ctct-email-disabled").prop("disabled",!1),l.show(),a.show()):(c=!0,s.prop("checked",!0),n(o).find("select").addClass("disabled ctct-email-disabled").prop("disabled",!0),l.hide(),a.hide()),t.ctct_admin_placeholders){var m=t.ctct_admin_placeholders[n(o).find("select").val()];m&&m.length&&p.length?p.attr("placeholder","Example: "+m):t.ctct_admin_placeholders["default"]&&p.attr("placeholder",t.ctct_admin_placeholders["default"])}})},c.removeDuplicateMappings=function(){var t=[],c="#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping select",e=n(c);e.each(function(c,e){t.push(n(e).val())}),e.children().show(),t.forEach(function(t){"custom_text_area"!=t&&"custom"!=t&&n(c+" option[value="+t+"]:not( :selected )").hide()})},n(c.init)}(window,jQuery,window.CTCTBuilder),window.CTCTForms={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={window:n(t),body:n("body"),disconnect:".ctct-disconnect"}},c.bindEvents=function(){n(c.$c.disconnect).on("click",function(t){confirm(ctct_texts.disconnectconfirm)})},n(c.init)}(window,jQuery,window.CTCTForms),window.CTCTModal={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={window:n(t),modalSelector:n(".ctct-modal"),modalClose:n(".ctct-modal-close"),textareaModal:n("#ctct-custom-textarea-modal"),textareaLink:n("#ctct-open-textarea-info")}},c.bindEvents=function(){c.$c.modalClose.click(function(){c.$c.modalSelector.removeClass("ctct-modal-open"),c.$c.modalSelector.hasClass("ctct-custom-textarea-modal")||jQuery.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"ctct_dismiss_first_modal",ctct_is_dismissed:"true"}})}),c.$c.textareaLink.on("click",function(){c.$c.textareaModal.addClass("ctct-modal-open")})},n(c.init)}(window,jQuery,window.CTCTModal),window.CTCTNewsletter={},function(t,n,c){c.init=function(){c.submitNewsletter()},n(c.init),c.submitNewsletter=function(){n(".ctct-body #subscribe").on("submit",function(t){t.preventDefault(),console.log("connect");var c=n("#subscribe .ctct-call-to-action"),e=n(".ctct-body #subscribe")[0],o=n(".ctct-call-to-action input[type='text']")[0],i=t.target.action;o.validity.valid===!0?(n("<iframe>",{src:i+"?"+n(e).serialize(),height:0,width:0,style:"display: none;"}).appendTo(c),n("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)",color:"rgb(255,255,255)"}),n("#subscribe .ctct-call-to-action-text").css({width:"70%"})):n("#subbutton").val("Error occurred")}),n(".ctct-section #subscribe").on("submit",function(t){t.preventDefault();var c=n(".section-marketing-tips"),e=n(".ctct-section #subscribe")[0],o=n(".ctct-section #subscribe input[type='text']")[0],i=t.target.action;o.validity.valid===!0?(n("<iframe>",{src:i+"?"+n(e).serialize(),height:0,width:0,style:"display: none;"}).appendTo(c),n("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)"})):n("#subbutton").val("Error occurred")})}}(window,jQuery,window.CTCTNewsletter),window.CTCT_OptIns={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={optin_no_conn:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected"),list:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_list"),optin:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in"),instruct:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions")}},c.bindEvents=function(){c.$c.optin_no_conn.length&&(c.toggleNoConnectionFields(),c.$c.optin_no_conn.change(function(){c.toggleNoConnectionFields()})),c.$c.list.length&&(c.toggleConnectionFields(),c.$c.list.change(function(){c.toggleConnectionFields()}))},c.toggleNoConnectionFields=function(){c.$c.optin_no_conn.prop("checked")?c.$c.instruct.slideDown():c.$c.instruct.slideUp()},c.toggleConnectionFields=function(){""!=c.$c.list.val()?(c.$c.optin.slideDown(),c.$c.instruct.slideDown()):(c.$c.optin.slideUp(),c.$c.instruct.slideUp())},n(c.init)}(window,jQuery,window.CTCT_OptIns);
|
assets/js/ctct-plugin-admin/ajax.js
CHANGED
@@ -30,6 +30,27 @@ window.CTCTAJAX = {};
|
|
30 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
31 |
});
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
$('#_ctct_data_tracking').on('click', function(e) {
|
34 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
35 |
});
|
30 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
31 |
});
|
32 |
|
33 |
+
$('#ctct-connect-ga-optin a').on('click', function (e) {
|
34 |
+
var ctct_optin_ajax = {
|
35 |
+
'action': 'constant_contact_optin_ajax_handler',
|
36 |
+
'optin' : $(this).attr('data-allow')
|
37 |
+
}
|
38 |
+
|
39 |
+
$.ajax({
|
40 |
+
url : ajaxurl,
|
41 |
+
data : ctct_optin_ajax,
|
42 |
+
dataType: 'json',
|
43 |
+
success : function (response) {
|
44 |
+
$('.ctct-connected-opt-in').hide();
|
45 |
+
},
|
46 |
+
error : function (x, t, m) {
|
47 |
+
if (window.console) {
|
48 |
+
console.log([t, m]);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
});
|
52 |
+
});
|
53 |
+
|
54 |
$('#_ctct_data_tracking').on('click', function(e) {
|
55 |
$('#ctct-privacy-modal').toggleClass('ctct-modal-open');
|
56 |
});
|
assets/js/ctct-plugin-admin/builder.js
CHANGED
@@ -152,8 +152,10 @@ window.CTCTBuilder = {};
|
|
152 |
$fieldTitle.text( $mapName );
|
153 |
|
154 |
// If we have a blank field label, then use the name of the field to fill it in
|
155 |
-
if (
|
156 |
-
$labelField.val(
|
|
|
|
|
157 |
}
|
158 |
|
159 |
// If we haven't yet found an email field, and this is our email field
|
152 |
$fieldTitle.text( $mapName );
|
153 |
|
154 |
// If we have a blank field label, then use the name of the field to fill it in
|
155 |
+
if ($labelField.val().length === 0) {
|
156 |
+
$labelField.val($mapName).addClass('ctct-label-filled');
|
157 |
+
} else {
|
158 |
+
$labelField.addClass('ctct-label-filled');
|
159 |
}
|
160 |
|
161 |
// If we haven't yet found an email field, and this is our email field
|
assets/sass/admin-global-no-connection.scss
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
@import 'variables';
|
2 |
@import 'mixins';
|
3 |
|
4 |
-
|
5 |
#adminmenu .wp-submenu a[href="edit.php?post_type=ctct_forms&page=ctct_options_connect"] {
|
6 |
-
|
7 |
}
|
8 |
|
9 |
//--------------------------------------------------------------
|
@@ -11,230 +10,287 @@
|
|
11 |
//--------------------------------------------------------------
|
12 |
|
13 |
.ctct_options_connect {
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
|
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
width: 100%;
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
}
|
|
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
margin:
|
56 |
-
width: 50%;
|
57 |
-
}
|
58 |
-
#subbutton {
|
59 |
-
color: $color-prussian-blue;
|
60 |
-
float: right;
|
61 |
|
62 |
@media screen and (max-width: 782px) {
|
63 |
-
|
64 |
}
|
65 |
}
|
|
|
66 |
}
|
|
|
|
|
|
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
}
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
margin-bottom: 10px;
|
79 |
-
margin-top: 10px;
|
80 |
-
} // h3
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
font-size: 14.7px;
|
85 |
-
margin: 0;
|
86 |
-
|
87 |
-
&.ctct-description {
|
88 |
-
font-size: 16px;
|
89 |
-
margin-bottom: 50px;
|
90 |
-
margin-top: 5px;
|
91 |
-
} // ctct-description
|
92 |
-
|
93 |
-
&.small {
|
94 |
-
color: $color-light-silver;
|
95 |
-
font-size: 13.3px;
|
96 |
-
margin: 15px auto 0;
|
97 |
-
|
98 |
-
@media screen and (max-width: 782px) {
|
99 |
-
max-width: 100%;
|
100 |
-
}
|
101 |
}
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
}
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
height: 0;
|
128 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
|
131 |
-
.right {
|
132 |
-
box-sizing: border-box;
|
133 |
-
box-sizing: border-box;
|
134 |
-
float:left;
|
135 |
-
margin-bottom: -500px;
|
136 |
-
padding: 15px 0px 520px;
|
137 |
-
text-align: center;
|
138 |
-
width: 50%;
|
139 |
-
|
140 |
-
@media screen and (max-width: 782px) {
|
141 |
-
float: none;
|
142 |
-
margin-bottom: 0;
|
143 |
-
padding: 15px 0;
|
144 |
-
width: 100%;
|
145 |
-
}
|
146 |
-
|
147 |
-
img,
|
148 |
-
svg {
|
149 |
-
|
150 |
-
&.flare {
|
151 |
-
width: 180px;
|
152 |
-
height: auto;
|
153 |
-
} // flare
|
154 |
-
} // img
|
155 |
-
} // left-right
|
156 |
-
.left {
|
157 |
-
border-right: 1px solid $color-silver;
|
158 |
-
padding-right: 70px;
|
159 |
-
|
160 |
-
@media screen and (max-width: 782px) {
|
161 |
-
border-bottom: 1px solid $color-silver;
|
162 |
-
border-right: 0;
|
163 |
-
padding-bottom: 30px;
|
164 |
-
padding-right: 0;
|
165 |
-
}
|
166 |
-
|
167 |
-
p {
|
168 |
-
max-width: 220px;
|
169 |
-
margin: 0 auto 25px;
|
170 |
-
|
171 |
-
@media screen and (max-width: 782px) {
|
172 |
-
max-width: 100%;
|
173 |
-
}
|
174 |
-
} // p
|
175 |
-
} // left
|
176 |
-
.right {
|
177 |
-
padding-left: 70px;
|
178 |
-
|
179 |
-
@media screen and (max-width: 782px) {
|
180 |
-
padding-left: 0;
|
181 |
-
padding-top: 30px;
|
182 |
-
}
|
183 |
-
|
184 |
-
p {
|
185 |
-
display: block;
|
186 |
-
max-width: 350px;
|
187 |
-
margin: 0 auto 25px;
|
188 |
-
|
189 |
-
@media screen and (max-width: 782px) {
|
190 |
-
max-width: 100%;
|
191 |
-
}
|
192 |
-
} // p
|
193 |
-
} // right
|
194 |
-
.button {
|
195 |
-
border-radius: 4px;
|
196 |
-
color: $color-white;
|
197 |
-
font-size: 16px;
|
198 |
-
font-weight: 600;
|
199 |
-
height: auto;
|
200 |
-
line-height: 1;
|
201 |
-
margin-bottom: 10px;
|
202 |
-
min-width: 180px;
|
203 |
-
padding: 14px 30px;
|
204 |
-
|
205 |
-
&.button-orange {
|
206 |
-
background-color: $color-chrome-yellow;
|
207 |
-
border: 1px solid darken($color-chrome-yellow, 10%);
|
208 |
-
|
209 |
-
&:hover,
|
210 |
-
&:focus {
|
211 |
-
background-color: darken($color-chrome-yellow, 10%);
|
212 |
-
}
|
213 |
-
} // button orange
|
214 |
-
|
215 |
-
&.button-blue {
|
216 |
-
background-color: $color-prussian-blue;
|
217 |
-
border: 1px solid darken($color-prussian-blue, 10%);
|
218 |
-
|
219 |
-
&:hover,
|
220 |
-
&:focus {
|
221 |
-
background-color: darken($color-prussian-blue, 10%);
|
222 |
-
}
|
223 |
-
} // button blue
|
224 |
-
} // button
|
225 |
-
} // ctct-body
|
226 |
-
} // ctct_options_connect
|
227 |
|
228 |
.error {
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
-
|
238 |
-
color: $color-red !important;
|
239 |
-
} // p
|
240 |
-
} // error
|
1 |
@import 'variables';
|
2 |
@import 'mixins';
|
3 |
|
|
|
4 |
#adminmenu .wp-submenu a[href="edit.php?post_type=ctct_forms&page=ctct_options_connect"] {
|
5 |
+
color: rgb(58, 209, 130);
|
6 |
}
|
7 |
|
8 |
//--------------------------------------------------------------
|
10 |
//--------------------------------------------------------------
|
11 |
|
12 |
.ctct_options_connect {
|
13 |
+
box-sizing: border-box;
|
14 |
+
padding: 70px;
|
15 |
+
text-align: center;
|
16 |
+
width: 100%;
|
17 |
+
|
18 |
+
hr {
|
19 |
+
margin-bottom: 45px;
|
20 |
+
}
|
21 |
+
|
22 |
+
@media screen and (max-width: 782px) {
|
23 |
+
padding: 30px 30px 0;
|
24 |
+
margin-left: -10px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.ctct-call-to-action {
|
28 |
+
margin-bottom: 45px;
|
29 |
+
overflow: hidden;
|
30 |
+
text-align: left;
|
31 |
width: 100%;
|
32 |
+
p {
|
33 |
+
float: left;
|
34 |
+
margin: 0;
|
35 |
+
}
|
36 |
+
a {
|
37 |
+
float: right;
|
38 |
+
text-align: center;
|
39 |
+
@media screen and (max-width: 782px) {
|
40 |
+
float: none;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
.ctct-call-to-action-text {
|
44 |
+
a {
|
45 |
+
float: none;
|
46 |
+
}
|
47 |
+
small {
|
48 |
+
line-height: 1.2px;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
#subbox {
|
53 |
+
height: 40px;
|
54 |
+
margin: 15px 0;
|
55 |
+
width: 50%;
|
56 |
+
}
|
57 |
+
#subbutton {
|
58 |
+
color: $color-prussian-blue;
|
59 |
+
float: right;
|
60 |
|
61 |
+
@media screen and (max-width: 782px) {
|
62 |
+
float: none;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
img {
|
68 |
+
width: 100%;
|
69 |
+
max-width: 400px;
|
70 |
+
height: auto;
|
71 |
+
}
|
72 |
+
|
73 |
+
h3 {
|
74 |
+
color: darken($color-prussian-blue, 10%);
|
75 |
+
font-size: 20px;
|
76 |
+
line-height: 1.2;
|
77 |
+
margin-bottom: 10px;
|
78 |
+
margin-top: 10px;
|
79 |
+
}
|
80 |
+
// h3
|
81 |
+
|
82 |
+
p {
|
83 |
+
color: $color-modal-alt-text;
|
84 |
+
font-size: 14.7px;
|
85 |
+
margin: 0;
|
86 |
+
|
87 |
+
&.ctct-description {
|
88 |
+
font-size: 16px;
|
89 |
+
margin-bottom: 50px;
|
90 |
+
margin-top: 5px;
|
91 |
}
|
92 |
+
// ctct-description
|
93 |
|
94 |
+
&.small {
|
95 |
+
color: $color-light-silver;
|
96 |
+
font-size: 13.3px;
|
97 |
+
margin: 15px auto 0;
|
98 |
+
|
99 |
+
@media screen and (max-width: 782px) {
|
100 |
+
max-width: 100%;
|
101 |
+
}
|
102 |
}
|
103 |
+
}
|
104 |
+
// p
|
105 |
+
|
106 |
+
.ctct-body {
|
107 |
+
@include clearfix;
|
108 |
|
109 |
+
.ctct-call-to-action-text {
|
110 |
+
float: left;
|
111 |
+
width: 75%;
|
112 |
+
|
113 |
+
@media screen and (max-width: 782px) {
|
114 |
+
width: 100%;
|
115 |
+
}
|
116 |
+
|
117 |
+
h3 {
|
118 |
+
margin-top: 0;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
margin: 0 auto;
|
122 |
+
max-width: 75%;
|
123 |
+
overflow-y: hidden;
|
124 |
+
position: relative;
|
125 |
+
|
126 |
+
.clear {
|
127 |
width: 100%;
|
128 |
+
clear: both;
|
129 |
+
height: 0;
|
130 |
+
}
|
131 |
+
|
132 |
+
.left,
|
133 |
+
.right {
|
134 |
+
box-sizing: border-box;
|
135 |
+
box-sizing: border-box;
|
136 |
+
float: left;
|
137 |
+
margin-bottom: -500px;
|
138 |
+
padding: 15px 0px 520px;
|
139 |
+
text-align: center;
|
140 |
+
width: 50%;
|
141 |
+
|
142 |
+
@media screen and (max-width: 782px) {
|
143 |
+
float: none;
|
144 |
+
margin-bottom: 0;
|
145 |
+
padding: 15px 0;
|
146 |
+
width: 100%;
|
147 |
}
|
148 |
+
|
149 |
+
img,
|
150 |
+
svg {
|
151 |
+
|
152 |
+
&.flare {
|
153 |
+
width: 180px;
|
154 |
+
height: auto;
|
155 |
}
|
156 |
+
// flare
|
157 |
}
|
158 |
+
// img
|
159 |
+
}
|
160 |
+
// left-right
|
161 |
+
.left {
|
162 |
+
border-right: 1px solid $color-silver;
|
163 |
+
padding-right: 70px;
|
164 |
+
|
165 |
+
@media screen and (max-width: 782px) {
|
166 |
+
border-bottom: 1px solid $color-silver;
|
167 |
+
border-right: 0;
|
168 |
+
padding-bottom: 30px;
|
169 |
+
padding-right: 0;
|
170 |
}
|
171 |
|
172 |
+
p {
|
173 |
+
max-width: 220px;
|
174 |
+
margin: 0 auto 25px;
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
@media screen and (max-width: 782px) {
|
177 |
+
max-width: 100%;
|
178 |
}
|
179 |
}
|
180 |
+
// p
|
181 |
}
|
182 |
+
// left
|
183 |
+
.right {
|
184 |
+
padding-left: 70px;
|
185 |
|
186 |
+
@media screen and (max-width: 782px) {
|
187 |
+
padding-left: 0;
|
188 |
+
padding-top: 30px;
|
189 |
+
}
|
|
|
190 |
|
191 |
+
p {
|
192 |
+
display: block;
|
193 |
+
max-width: 350px;
|
194 |
+
margin: 0 auto 25px;
|
|
|
|
|
|
|
195 |
|
196 |
+
@media screen and (max-width: 782px) {
|
197 |
+
max-width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
+
}
|
200 |
+
// p
|
201 |
+
}
|
202 |
+
// right
|
203 |
+
.button {
|
204 |
+
border-radius: 4px;
|
205 |
+
color: $color-white;
|
206 |
+
font-size: 16px;
|
207 |
+
font-weight: 600;
|
208 |
+
height: auto;
|
209 |
+
line-height: 1;
|
210 |
+
margin-bottom: 10px;
|
211 |
+
min-width: 180px;
|
212 |
+
padding: 14px 30px;
|
213 |
+
|
214 |
+
&.button-orange {
|
215 |
+
background-color: $color-chrome-yellow;
|
216 |
+
border: 1px solid darken($color-chrome-yellow, 10%);
|
217 |
+
|
218 |
+
&:hover,
|
219 |
+
&:focus {
|
220 |
+
background-color: darken($color-chrome-yellow, 10%);
|
221 |
+
}
|
222 |
+
}
|
223 |
+
// button orange
|
224 |
|
225 |
+
&.button-blue {
|
226 |
+
background-color: $color-prussian-blue;
|
227 |
+
border: 1px solid darken($color-prussian-blue, 10%);
|
228 |
|
229 |
+
&:hover,
|
230 |
+
&:focus {
|
231 |
+
background-color: darken($color-prussian-blue, 10%);
|
232 |
}
|
233 |
+
}
|
234 |
+
// button blue
|
235 |
+
}
|
236 |
+
// button
|
237 |
+
.ctct-connected {
|
238 |
+
.ctct-connected-next-step {
|
239 |
+
h3 {
|
240 |
+
color: $color-green;
|
|
|
241 |
}
|
242 |
+
margin-bottom: 40px;
|
243 |
+
}
|
244 |
+
.ctct-disconnect-text {
|
245 |
+
float: left;
|
246 |
+
margin-bottom: 50px;
|
247 |
+
overflow: hidden;
|
248 |
+
text-align: left;
|
249 |
+
}
|
250 |
+
form {
|
251 |
+
float: right;
|
252 |
+
}
|
253 |
+
.button {
|
254 |
+
color: $color-prussian-blue;
|
255 |
+
&.button-blue {
|
256 |
+
color: $color-white;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
.ctct-connected-next-step {
|
260 |
+
clear: both;
|
261 |
+
}
|
262 |
+
.ctct-connect-ga-optin {
|
263 |
+
margin-top: 15px;
|
264 |
+
}
|
265 |
+
@media screen and (max-width: 782px) {
|
266 |
+
.ctct-disconnect-text {
|
267 |
+
float: none;
|
268 |
+
text-align: center
|
269 |
+
}
|
270 |
+
form {
|
271 |
+
float: none;
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
+
// ctct-body
|
277 |
+
}
|
278 |
|
279 |
+
// ctct_options_connect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
|
281 |
.error {
|
282 |
+
background: none !important;
|
283 |
+
border-left: 1px solid $color-red !important;
|
284 |
+
border-radius: 3px;
|
285 |
+
border: 1px solid $color-red;
|
286 |
+
box-shadow: none !important;
|
287 |
+
display: inline-block;
|
288 |
+
margin: 0 0 20px 0 !important;
|
289 |
+
|
290 |
+
p {
|
291 |
+
color: $color-red !important;
|
292 |
+
}
|
293 |
+
// p
|
294 |
+
}
|
295 |
|
296 |
+
// error
|
|
|
|
|
|
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.2.
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com
|
18 |
* License: GPLv3
|
@@ -77,7 +77,7 @@ class Constant_Contact {
|
|
77 |
* @var string
|
78 |
* @since 1.0.0
|
79 |
*/
|
80 |
-
const VERSION = '1.2.
|
81 |
|
82 |
/**
|
83 |
* URL of plugin directory
|
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.2.5
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com
|
18 |
* License: GPLv3
|
77 |
* @var string
|
78 |
* @since 1.0.0
|
79 |
*/
|
80 |
+
const VERSION = '1.2.5';
|
81 |
|
82 |
/**
|
83 |
* URL of plugin directory
|
includes/class-connect.php
CHANGED
@@ -179,17 +179,41 @@ class ConstantContact_Connect {
|
|
179 |
<img class="ctct-logo" src="<?php echo esc_url( constant_contact()->url . 'assets/images/constant-contact-logo.png' ); ?>">
|
180 |
<div class="ctct-body">
|
181 |
<?php if ( constantcontact_api()->get_api_token() ) : ?>
|
182 |
-
<div class="message notice">
|
183 |
-
<p>
|
184 |
-
<?php esc_html_e( 'Plugin connected to Constant Contact.', 'constant-contact-forms' ); ?>
|
185 |
-
</p>
|
186 |
-
</div>
|
187 |
|
188 |
-
<
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
<?php else : ?>
|
195 |
|
179 |
<img class="ctct-logo" src="<?php echo esc_url( constant_contact()->url . 'assets/images/constant-contact-logo.png' ); ?>">
|
180 |
<div class="ctct-body">
|
181 |
<?php if ( constantcontact_api()->get_api_token() ) : ?>
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
<div class="ctct-connected">
|
184 |
+
<div class="ctct-disconnect-wrap">
|
185 |
+
<div class="ctct-disconnect-text">
|
186 |
+
<h3><?php esc_html_e( 'Account connected.', 'constant-contact-forms' ); ?></h3>
|
187 |
+
<p>
|
188 |
+
<?php esc_html_e( 'Plugin connected to Constant Contact.', 'constant-contact-forms' ); ?>
|
189 |
+
</p>
|
190 |
+
</div>
|
191 |
+
<form method="post" action="<?php echo esc_url( $this->redirect_url ); ?>">
|
192 |
+
<?php wp_nonce_field( 'ctct-admin-disconnect', 'ctct-admin-disconnect' ); ?>
|
193 |
+
<input type="hidden" id="ctct-disconnect" name="ctct-disconnect" value="true">
|
194 |
+
<input type="submit" class="button ctct-disconnect" value="<?php esc_html_e( 'Disconnect', 'constant-contact-forms' ); ?>">
|
195 |
+
</form>
|
196 |
+
</div>
|
197 |
+
|
198 |
+
<?php if ( ! ctct_has_forms() ) : ?>
|
199 |
+
<div class="ctct-connected-next-step">
|
200 |
+
<h3><?php esc_html_e( 'Your account is connected! Now, add a new form.', 'constant-contact-forms' ); ?></h3>
|
201 |
+
<div class="ctct-video">
|
202 |
+
<script src="https://fast.wistia.com/embed/medias/xix7jf8p55.jsonp" async></script>
|
203 |
+
<script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
|
204 |
+
<div class="wistia_embed wistia_async_xix7jf8p55 seo=false" style="height:225px;width:400px;margin:0 auto;"> </div>
|
205 |
+
</div>
|
206 |
+
</div>
|
207 |
+
<div class="ctct-connected-opt-in">
|
208 |
+
<h3><?php esc_html_e( 'Please help to improve this plugin.', 'constant-contact-forms' ); ?></h3>
|
209 |
+
<p><?php printf( esc_html__( 'Allow Constant Contact to use Google Analytics™ to track your usage across the Constant Contact Forms plugin. You can opt-out within the Settings page. See our %s.', 'constant-contact-forms' ), '<a href="https://www.constantcontact.com/legal/privacy-statement">' . __( 'Privacy Statement', 'constant-contact-forms' ) . '</a>' ); ?></p>
|
210 |
+
<div id="ctct-connect-ga-optin" class="ctct-connect-ga-optin">
|
211 |
+
<a class="button button-blue ctct-connect" data-allow="on"><?php esc_html_e( 'Allow', 'constant-contact-forms' ); ?></a>
|
212 |
+
<a class="button no-bg" data-allow="off"><?php esc_html_e( 'Dismiss', 'constant-contact-forms' ); ?></a>
|
213 |
+
</div>
|
214 |
+
</div>
|
215 |
+
<?php endif; ?>
|
216 |
+
</div>
|
217 |
|
218 |
<?php else : ?>
|
219 |
|
includes/class-mail.php
CHANGED
@@ -61,15 +61,18 @@ class ConstantContact_Mail {
|
|
61 |
// If a user opted-in and we're still connected, push their data to CC.
|
62 |
if ( $add_to_opt_in && constant_contact()->api->is_connected() ) {
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
// Pretty our values.
|
61 |
// If a user opted-in and we're still connected, push their data to CC.
|
62 |
if ( $add_to_opt_in && constant_contact()->api->is_connected() ) {
|
63 |
|
64 |
+
$maybe_bypass = ctct_get_settings_option( '_ctct_bypass_cron', '' );
|
65 |
+
|
66 |
+
if ( 'on' !== $maybe_bypass ) {
|
67 |
+
/**
|
68 |
+
* Filters the delay between scheduling of the opt-in e-mail event.
|
69 |
+
* @since 1.0.2
|
70 |
+
*
|
71 |
+
* @param int $schedule_delay The time to add to `time()` for the event.
|
72 |
+
*/
|
73 |
+
$schedule_delay = apply_filters( 'constant_contact_opt_in_delay', MINUTE_IN_SECONDS );
|
74 |
+
wp_schedule_single_event( time() + absint( $schedule_delay ), 'ctct_schedule_form_opt_in', array( $values ) );
|
75 |
+
}
|
76 |
}
|
77 |
|
78 |
// Pretty our values.
|
includes/class-process-form.php
CHANGED
@@ -253,6 +253,12 @@ class ConstantContact_Process_Form {
|
|
253 |
constant_contact()->mail->submit_form_values( $return['values'], true );
|
254 |
}
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
$return['status'] = 'success';
|
257 |
return $return;
|
258 |
}
|
253 |
constant_contact()->mail->submit_form_values( $return['values'], true );
|
254 |
}
|
255 |
|
256 |
+
// No need to check for opt in status because we would have returned early by now if false.
|
257 |
+
$maybe_bypass = ctct_get_settings_option( '_ctct_bypass_cron', '' );
|
258 |
+
if ( constant_contact()->api->is_connected() && 'on' === $maybe_bypass ) {
|
259 |
+
constant_contact()->mail->opt_in_user( $this->clean_values( $return['values'] ) );
|
260 |
+
}
|
261 |
+
|
262 |
$return['status'] = 'success';
|
263 |
return $return;
|
264 |
}
|
includes/class-settings.php
CHANGED
@@ -264,6 +264,15 @@ class ConstantContact_Settings {
|
|
264 |
'before_row' => '<hr/>',
|
265 |
) );
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
// Get our lists.
|
268 |
$lists = constant_contact()->builder->get_lists();
|
269 |
|
264 |
'before_row' => '<hr/>',
|
265 |
) );
|
266 |
|
267 |
+
// Make API contact requests immediately instead of via cron.
|
268 |
+
$cmb->add_field( array(
|
269 |
+
'name' => __( 'Bypass Constant Contact cron scheduling', 'constant-contact-forms' ),
|
270 |
+
'desc' => __( 'This option will send form entries to Constant Contact right away instead of holding for one minute delay.', 'constant-contact-forms' ),
|
271 |
+
'id' => '_ctct_bypass_cron',
|
272 |
+
'type' => 'checkbox',
|
273 |
+
'before_row' => '<hr/>',
|
274 |
+
) );
|
275 |
+
|
276 |
// Get our lists.
|
277 |
$lists = constant_contact()->builder->get_lists();
|
278 |
|
includes/helper-functions.php
CHANGED
@@ -265,3 +265,20 @@ function ctct_custom_form_action_processing() {
|
|
265 |
return constant_contact()->process_form->process_form();
|
266 |
}
|
267 |
add_action( 'wp_head', 'ctct_custom_form_action_processing' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
return constant_contact()->process_form->process_form();
|
266 |
}
|
267 |
add_action( 'wp_head', 'ctct_custom_form_action_processing' );
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Determine if we have any Constant Contact Forms published.
|
271 |
+
*
|
272 |
+
* @since 1.2.5
|
273 |
+
*
|
274 |
+
* @return bool
|
275 |
+
*/
|
276 |
+
function ctct_has_forms() {
|
277 |
+
$args = array(
|
278 |
+
'post_type' => 'ctct_forms',
|
279 |
+
'post_status' => 'publish',
|
280 |
+
'posts_per_page' => 1
|
281 |
+
);
|
282 |
+
$forms = new WP_Query( $args );
|
283 |
+
return ( $forms->have_posts() );
|
284 |
+
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: constantcontact
|
|
3 |
Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 1.2.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -33,6 +33,11 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
|
|
33 |
|
34 |
== Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
36 |
= 1.2.4 =
|
37 |
* Added: Google reCAPTCHA "I am human" checkbox support for forms. See https://www.google.com/recaptcha/intro/. Will fall back to honeypot prevention if not set up.
|
38 |
* Fixed: Stray quote mark in honeypot markup.
|
3 |
Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 1.2.5
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
33 |
|
34 |
== Changelog ==
|
35 |
|
36 |
+
= 1.2.5 =
|
37 |
+
* Fixed: Customized labels no longer reset to default when adding new fields.
|
38 |
+
* Added: Ability to bypass using WP_CRON when trying to have form entries sent to ConstantContact.com lists. If you're having trouble getting them sent, use this setting.
|
39 |
+
* Updated: Revised content for "Disconnect" page when connected, and have not created a form yet.
|
40 |
+
|
41 |
= 1.2.4 =
|
42 |
* Added: Google reCAPTCHA "I am human" checkbox support for forms. See https://www.google.com/recaptcha/intro/. Will fall back to honeypot prevention if not set up.
|
43 |
* Fixed: Stray quote mark in honeypot markup.
|