Version Description
- November 4, 2014 =
Updates
- Remove update profile info link, replaced with user already subscribed error
Fixes
- Fix missing argument in getFrontendFormDisplay_field when using the table view
Download this release
Release Info
| Developer | eherman24 |
| Plugin | |
| Version | 5.1.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 5.1 to 5.1.0.1
- classes/class.yksemeBase.php +6 -7
- process/public.ajax.php +0 -11
- readme.txt +17 -2
- templates/shortcode_form.php +0 -95
- yikes-inc-easy-mailchimp-extender.php +2 -2
classes/class.yksemeBase.php
CHANGED
|
@@ -97,7 +97,7 @@ public function initialize()
|
|
| 97 |
add_filter( 'yikes_mc_get_form_data', array( &$this , 'yikes_mc_get_form_data_filter' ) , 10 );
|
| 98 |
|
| 99 |
// Custom Filter To Alter User Already Subscribed Message
|
| 100 |
-
add_filter( 'yikes_mc_user_already_subscribed', array( &$this , 'yikes_mc_user_already_subscribed_error_message_filter' ) , 10 ,
|
| 101 |
|
| 102 |
|
| 103 |
// tinymce buttons
|
|
@@ -156,7 +156,7 @@ public function yikes_mc_get_form_data_filter( $mv ) {
|
|
| 156 |
}
|
| 157 |
|
| 158 |
/** Custom Filter To Alter User Already Subscribed Error Message **/
|
| 159 |
-
public function yikes_mc_user_already_subscribed_error_message_filter( $errorMessage , $
|
| 160 |
return $errorMessage;
|
| 161 |
}
|
| 162 |
|
|
@@ -2677,9 +2677,8 @@ public function addUserToMailchimp($p,$update_existing)
|
|
| 2677 |
} catch( Exception $e ) { // catch any errors returned from MailChimp
|
| 2678 |
$errorCode = $e->getCode();
|
| 2679 |
if ( $errorCode = '214' ) {
|
| 2680 |
-
$
|
| 2681 |
-
$errorMessage
|
| 2682 |
-
return apply_filters( 'yikes_mc_user_already_subscribed' , $errorMessage , $update_user_link , $email );
|
| 2683 |
die();
|
| 2684 |
} else {
|
| 2685 |
echo '<strong>'.$e->getMessage().'</strong>';
|
|
@@ -3234,7 +3233,7 @@ public function getFrontendFormDisplay($list='', $submit_text)
|
|
| 3234 |
<tr class="yks-mailchimpFormTableRow">
|
| 3235 |
<td class="prompt yks-mailchimpFormTableRowLabel"><label class="prompt yks-mailchimpFormTableRowLabel<?php echo $reqlabel; ?>" for="<?php echo $field['id']; ?>"><?php echo $field['label']; ?><?php echo $reqindicator; ?></label>
|
| 3236 |
<!-- run our function to generate the input fields for the form, passing in the field -->
|
| 3237 |
-
<?php echo $this->getFrontendFormDisplay_field($field); ?>
|
| 3238 |
</td>
|
| 3239 |
</tr>
|
| 3240 |
<?php
|
|
@@ -3490,7 +3489,7 @@ public function getFrontendFormDisplay_placeholder_labels($list='', $submit_text
|
|
| 3490 |
?>
|
| 3491 |
<tr class="yks-mailchimpFormTableRow">
|
| 3492 |
<!-- run our function to generate the input fields for the form, passing in the field -->
|
| 3493 |
-
<?php echo $this->getFrontendFormDisplay_field($field); ?>
|
| 3494 |
</tr>
|
| 3495 |
<?php
|
| 3496 |
$num++;
|
| 97 |
add_filter( 'yikes_mc_get_form_data', array( &$this , 'yikes_mc_get_form_data_filter' ) , 10 );
|
| 98 |
|
| 99 |
// Custom Filter To Alter User Already Subscribed Message
|
| 100 |
+
add_filter( 'yikes_mc_user_already_subscribed', array( &$this , 'yikes_mc_user_already_subscribed_error_message_filter' ) , 10 , 2 );
|
| 101 |
|
| 102 |
|
| 103 |
// tinymce buttons
|
| 156 |
}
|
| 157 |
|
| 158 |
/** Custom Filter To Alter User Already Subscribed Error Message **/
|
| 159 |
+
public function yikes_mc_user_already_subscribed_error_message_filter( $errorMessage , $email ) {
|
| 160 |
return $errorMessage;
|
| 161 |
}
|
| 162 |
|
| 2677 |
} catch( Exception $e ) { // catch any errors returned from MailChimp
|
| 2678 |
$errorCode = $e->getCode();
|
| 2679 |
if ( $errorCode = '214' ) {
|
| 2680 |
+
$errorMessage = $e->getMessage();
|
| 2681 |
+
return apply_filters( 'yikes_mc_user_already_subscribed' , $errorMessage , $email );
|
|
|
|
| 2682 |
die();
|
| 2683 |
} else {
|
| 2684 |
echo '<strong>'.$e->getMessage().'</strong>';
|
| 3233 |
<tr class="yks-mailchimpFormTableRow">
|
| 3234 |
<td class="prompt yks-mailchimpFormTableRowLabel"><label class="prompt yks-mailchimpFormTableRowLabel<?php echo $reqlabel; ?>" for="<?php echo $field['id']; ?>"><?php echo $field['label']; ?><?php echo $reqindicator; ?></label>
|
| 3235 |
<!-- run our function to generate the input fields for the form, passing in the field -->
|
| 3236 |
+
<?php echo $this->getFrontendFormDisplay_field($field,$num); ?>
|
| 3237 |
</td>
|
| 3238 |
</tr>
|
| 3239 |
<?php
|
| 3489 |
?>
|
| 3490 |
<tr class="yks-mailchimpFormTableRow">
|
| 3491 |
<!-- run our function to generate the input fields for the form, passing in the field -->
|
| 3492 |
+
<?php echo $this->getFrontendFormDisplay_field($field,$num); ?>
|
| 3493 |
</tr>
|
| 3494 |
<?php
|
| 3495 |
$num++;
|
process/public.ajax.php
CHANGED
|
@@ -19,17 +19,6 @@ if(!empty($_POST)
|
|
| 19 |
echo $action;
|
| 20 |
}
|
| 21 |
break;
|
| 22 |
-
|
| 23 |
-
/* Resubmit form data - update previously subscribed user */
|
| 24 |
-
case 'frontend_resubmit_form_data':
|
| 25 |
-
$action = $yksemeBase->addUserToMailchimp($_POST,$update_existing='true');
|
| 26 |
-
if($action == "done")
|
| 27 |
-
{
|
| 28 |
-
echo '1';
|
| 29 |
-
} else {
|
| 30 |
-
echo $action;
|
| 31 |
-
}
|
| 32 |
-
break;
|
| 33 |
|
| 34 |
}
|
| 35 |
}
|
| 19 |
echo $action;
|
| 20 |
}
|
| 21 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
}
|
| 24 |
}
|
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: yikesinc, hiwhatsup, liljimmi, eherman24, seriouslysean
|
|
| 3 |
Donate link: http://yikesinc.com
|
| 4 |
Tags: mailchimp, marketing, email, mailing lists, newsletter, sign up, forms, sign up form
|
| 5 |
Requires at least: 3.0
|
| 6 |
-
Tested up to:
|
| 7 |
-
Stable tag: 5.1
|
| 8 |
License: GPLv2 or later
|
| 9 |
|
| 10 |
Easy MailChimp Forms allows you to painlessly add MailChimp sign up forms to your WordPress site and track user activity with interactive reports.
|
|
@@ -572,6 +572,16 @@ These functions should be used in conjunction with the `yikes_mc_get_form_data`
|
|
| 572 |
|
| 573 |
== Changelog ==
|
| 574 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 575 |
= 5.1 - November 3, 2014 =
|
| 576 |
|
| 577 |
**Updates**
|
|
@@ -787,6 +797,11 @@ These functions should be used in conjunction with the `yikes_mc_get_form_data`
|
|
| 787 |
|
| 788 |
== Upgrade Notice ==
|
| 789 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 790 |
= 5.1 - November 3, 2014 =
|
| 791 |
|
| 792 |
We have added brand new functionality, allowing users to easily customize forms on the fly, through a familiar UI as well as a templating framework to allow users to design and implement their own custom forms. A minor security bug was patched in this release as well. We fixed an issue with the API key check running on each page load, and added a few new filters to allow users to alter text (please view the [docs](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/other_notes/) for example)
|
| 3 |
Donate link: http://yikesinc.com
|
| 4 |
Tags: mailchimp, marketing, email, mailing lists, newsletter, sign up, forms, sign up form
|
| 5 |
Requires at least: 3.0
|
| 6 |
+
Tested up to: 4.0
|
| 7 |
+
Stable tag: 5.1.0.1
|
| 8 |
License: GPLv2 or later
|
| 9 |
|
| 10 |
Easy MailChimp Forms allows you to painlessly add MailChimp sign up forms to your WordPress site and track user activity with interactive reports.
|
| 572 |
|
| 573 |
== Changelog ==
|
| 574 |
|
| 575 |
+
= 5.1.0.1 - November 4, 2014 =
|
| 576 |
+
|
| 577 |
+
**Updates**
|
| 578 |
+
|
| 579 |
+
* Remove update profile info link, replaced with user already subscribed error
|
| 580 |
+
|
| 581 |
+
**Fixes**
|
| 582 |
+
|
| 583 |
+
* Fix missing argument in getFrontendFormDisplay_field when using the table view
|
| 584 |
+
|
| 585 |
= 5.1 - November 3, 2014 =
|
| 586 |
|
| 587 |
**Updates**
|
| 797 |
|
| 798 |
== Upgrade Notice ==
|
| 799 |
|
| 800 |
+
= 5.1.0.1 - November 4, 2014 =
|
| 801 |
+
|
| 802 |
+
Removed the update profile info link, some users brought up security concerns.
|
| 803 |
+
Fixed missing argument when using table display formatting.
|
| 804 |
+
|
| 805 |
= 5.1 - November 3, 2014 =
|
| 806 |
|
| 807 |
We have added brand new functionality, allowing users to easily customize forms on the fly, through a familiar UI as well as a templating framework to allow users to design and implement their own custom forms. A minor security bug was patched in this release as well. We fixed an issue with the API key check running on each page load, and added a few new filters to allow users to alter text (please view the [docs](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/other_notes/) for example)
|
templates/shortcode_form.php
CHANGED
|
@@ -132,101 +132,6 @@ $ymce = jQuery.noConflict();
|
|
| 132 |
return false;
|
| 133 |
});
|
| 134 |
|
| 135 |
-
/* user updates information for a given form */
|
| 136 |
-
$ymce('body').on( 'click' , '.update-user-info' , function(e) {
|
| 137 |
-
|
| 138 |
-
var singleOptinMessage = '<?php echo str_replace( '\'' , '"' , preg_replace('/\r?\n/', '\\n', apply_filters('yks_mc_content' , $this->optionVal['single-optin-message']))); ?>';
|
| 139 |
-
var doubleOptinMessage = '<?php echo str_replace( '\'' , '"' , preg_replace('/\r?\n/', '\\n', apply_filters('yks_mc_content' , $this->optionVal['double-optin-message']))); ?>';
|
| 140 |
-
var optinValue = '<?php echo $this->optionVal['optin']; ?>';
|
| 141 |
-
|
| 142 |
-
e.preventDefault();
|
| 143 |
-
// Make sure the api key exists
|
| 144 |
-
if( blankFieldCheck("<?php echo $list['id']; ?>") )
|
| 145 |
-
{
|
| 146 |
-
var form_data = $ymce(this).parents('#yks-mailchimp-form_<?php echo $list['id']; ?>').serialize();
|
| 147 |
-
// disable all input fields while the data send...
|
| 148 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( 'input' ).each(function() {
|
| 149 |
-
$ymce(this).attr('disabled','disabled').css('opacity','.8');
|
| 150 |
-
});
|
| 151 |
-
|
| 152 |
-
$ymce('#ykfmc-submit_<?php echo $list['id']; ?>').attr('disabled', 'disabled');
|
| 153 |
-
$ymce('#yks-status-<?php echo $list['id']; ?>').slideUp('fast');
|
| 154 |
-
$ymce.ajax({
|
| 155 |
-
type: 'POST',
|
| 156 |
-
url: '<?php echo YKSEME_URL_WP_AJAX; ?>',
|
| 157 |
-
data: {
|
| 158 |
-
action: 'yks_mailchimp_form_submit',
|
| 159 |
-
form_action: 'frontend_resubmit_form_data',
|
| 160 |
-
form_data: form_data
|
| 161 |
-
},
|
| 162 |
-
dataType: 'text',
|
| 163 |
-
success: function(MAILCHIMP)
|
| 164 |
-
{
|
| 165 |
-
if( MAILCHIMP.trim() == 1 )
|
| 166 |
-
{
|
| 167 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').children().each(function() {
|
| 168 |
-
$ymce(this).not('#wrapper').removeAttr( 'disabled' ).css( 'opacity' , '1' );
|
| 169 |
-
});
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
// custom message based on opt-in settings value
|
| 173 |
-
// single opt-in
|
| 174 |
-
if ( optinValue == 'false' ) {
|
| 175 |
-
$ymce('#yks-status-<?php echo $list['id']; ?>').html("<div class='yks-success'><p><?php echo apply_filters( 'yikes_mc_subscriber_update_message' , 'Thanks, your information has been successfuly updated.' , 10 ); ?></p></div>");
|
| 176 |
-
} else { // double opt-in
|
| 177 |
-
$ymce('#yks-status-<?php echo $list['id']; ?>').html("<div class='yks-success'><p><?php echo apply_filters( 'yikes_mc_subscriber_update_message' , 'Thanks, your information has been successfuly updated.' , 10 ); ?></p></div>");
|
| 178 |
-
}
|
| 179 |
-
|
| 180 |
-
/** Header Call Out Submission **/
|
| 181 |
-
if ( $ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').hasClass( 'header-callout-form' ) ) {
|
| 182 |
-
|
| 183 |
-
var container_height = $ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( '#wrapper' ).css( 'height' );
|
| 184 |
-
var container_width = $ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( '#wrapper' ).css( 'width' );
|
| 185 |
-
var top_margin_confirmation = ( container_height.replace( 'px' , '' , container_height ) - 25 ) / 2;
|
| 186 |
-
|
| 187 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( '#wrapper' ).css( 'height' , container_height ).css( 'width' , container_width );
|
| 188 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( '#wrapper' ).children().each(function() {
|
| 189 |
-
$ymce(this).fadeOut('fast');
|
| 190 |
-
}).promise().done( function() {
|
| 191 |
-
var confirmation_message = $ymce('#yks-status-<?php echo $list['id']; ?>');
|
| 192 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( '#wrapper' ).html( confirmation_message );
|
| 193 |
-
$ymce( confirmation_message ).removeClass('yks-status').fadeIn('fast').attr( 'style' , 'text-align:center;vertical-align:middle;margin-top:19%;');
|
| 194 |
-
});
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
} else {
|
| 198 |
-
|
| 199 |
-
/* old sliding confirmations */
|
| 200 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').slideUp('fast', function(){
|
| 201 |
-
$ymce('#yks-status-<?php echo $list['id']; ?>').slideDown('fast');
|
| 202 |
-
});
|
| 203 |
-
|
| 204 |
-
}
|
| 205 |
-
} else {
|
| 206 |
-
// bundle the MailChimp returned error
|
| 207 |
-
// with our yks mc error messages
|
| 208 |
-
$ymce('#yks_form_error_message').fadeOut('fast', function() {
|
| 209 |
-
jQuery(this).remove();
|
| 210 |
-
});
|
| 211 |
-
$ymce('#ykfmc-submit_<?php echo $list['id']; ?>').removeAttr('disabled');
|
| 212 |
-
|
| 213 |
-
// remove disable from all input fields while the data send...
|
| 214 |
-
$ymce('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').find( 'input' ).each(function() {
|
| 215 |
-
$ymce(this).removeAttr( 'disabled' ).css('opacity','1');
|
| 216 |
-
});
|
| 217 |
-
|
| 218 |
-
$ymce('#yks-mailchimp-form_<?php echo $list['id']; ?>').prepend('<span id="yks_form_error_message">'+MAILCHIMP+'</span>').delay(1000).queue(function(next){
|
| 219 |
-
jQuery('#yks_form_error_message').fadeIn();
|
| 220 |
-
var offset_top = jQuery('#yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>').offset().top;
|
| 221 |
-
jQuery("html, body").animate({ scrollTop: offset_top - 50 }, 500 );
|
| 222 |
-
next();
|
| 223 |
-
});
|
| 224 |
-
}
|
| 225 |
-
}
|
| 226 |
-
});
|
| 227 |
-
}
|
| 228 |
-
return false;
|
| 229 |
-
});
|
| 230 |
|
| 231 |
<?php // enqueue jQuery datepicker only when the user has specified to do so
|
| 232 |
if( isset( $this->optionVal['yks-mailchimp-jquery-datepicker'] ) && $this->optionVal['yks-mailchimp-jquery-datepicker'] == '1' ) { ?>
|
| 132 |
return false;
|
| 133 |
});
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
<?php // enqueue jQuery datepicker only when the user has specified to do so
|
| 137 |
if( isset( $this->optionVal['yks-mailchimp-jquery-datepicker'] ) && $this->optionVal['yks-mailchimp-jquery-datepicker'] == '1' ) { ?>
|
yikes-inc-easy-mailchimp-extender.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
Plugin Name: Easy MailChimp Forms
|
| 5 |
Plugin URI: http://www.yikesinc.com/services/yikes-inc-easy-mailchimp-extender/
|
| 6 |
Description: Mailchimp integration in the form of a shortcode, php snippet or widget. Now track account status, campaign stats, view subscribers and so much more!
|
| 7 |
-
Version: 5.1
|
| 8 |
Author: YIKES Inc
|
| 9 |
Author URI: http://yikesinc.com
|
| 10 |
License: GPL2
|
|
@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
| 30 |
|
| 31 |
/** Configuration **/
|
| 32 |
if(!defined('YKSEME_DEBUG')) define('YKSEME_DEBUG', false);
|
| 33 |
-
if(!defined('YKSEME_VERSION_CURRENT')) define('YKSEME_VERSION_CURRENT', '5.1');
|
| 34 |
if(!defined('YKSEME_REQ_PHP')) define('YKSEME_REQ_PHP', '5.0');
|
| 35 |
if(!defined('YKSEME_AUTHOR')) define('YKSEME_AUTHOR', 'YIKES Inc');
|
| 36 |
if(!defined('YKSEME_SITE')) define('YKSEME_SITE', site_url().'/');
|
| 4 |
Plugin Name: Easy MailChimp Forms
|
| 5 |
Plugin URI: http://www.yikesinc.com/services/yikes-inc-easy-mailchimp-extender/
|
| 6 |
Description: Mailchimp integration in the form of a shortcode, php snippet or widget. Now track account status, campaign stats, view subscribers and so much more!
|
| 7 |
+
Version: 5.1.0.1
|
| 8 |
Author: YIKES Inc
|
| 9 |
Author URI: http://yikesinc.com
|
| 10 |
License: GPL2
|
| 30 |
|
| 31 |
/** Configuration **/
|
| 32 |
if(!defined('YKSEME_DEBUG')) define('YKSEME_DEBUG', false);
|
| 33 |
+
if(!defined('YKSEME_VERSION_CURRENT')) define('YKSEME_VERSION_CURRENT', '5.1.0.1');
|
| 34 |
if(!defined('YKSEME_REQ_PHP')) define('YKSEME_REQ_PHP', '5.0');
|
| 35 |
if(!defined('YKSEME_AUTHOR')) define('YKSEME_AUTHOR', 'YIKES Inc');
|
| 36 |
if(!defined('YKSEME_SITE')) define('YKSEME_SITE', site_url().'/');
|
