Skip to content

Commit

Permalink
Merge branch 'release/1.2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkingorg committed Apr 17, 2012
2 parents a70f414 + 20441df commit e661356
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 9 additions & 8 deletions mailchimp.php
Expand Up @@ -3,7 +3,7 @@
Plugin Name: MailChimp
Plugin URI: http://www.mailchimp.com/plugins/mailchimp-wordpress-plugin/
Description: The MailChimp plugin allows you to quickly and easily add a signup form for your MailChimp list.
Version: 1.2.8
Version: 1.2.9
Author: MailChimp and Crowd Favorite
Author URI: http://mailchimp.com/api/
*/
Expand All @@ -25,7 +25,7 @@
*/

// Version constant for easy CSS refreshes
define('MCSF_VER', '1.2.8');
define('MCSF_VER', '1.2.9');

// What's our permission (capability) threshold
define('MCSF_CAP_THRESHOLD', 'manage_options');
Expand Down Expand Up @@ -1199,8 +1199,8 @@ function mailchimpSF_signup_submit() {

// Ensure we have an array
$igs = !is_array($igs) ? array() : $igs;
$groups = '';
foreach ($igs as $ig) {
$groups = '';
if (get_option('mc_show_interest_groups_'.$ig['id']) == 'on') {
$groupings = array();
switch ($ig['form_field']) {
Expand All @@ -1218,8 +1218,8 @@ function mailchimpSF_signup_submit() {
case 'checkbox':
if (isset($_POST['group'][$ig['id']])) {
foreach ($_POST['group'][$ig['id']] as $i => $value) {
// Escape
$groups .= str_replace(',', '\,', $value).',';

}
$groupings = array(
'id' => $ig['id'],
Expand Down Expand Up @@ -1368,13 +1368,14 @@ function mailchimpSF_where_am_i() {
);

// Set defaults
$mscf_dir = trailingslashit(WP_PLUGIN_DIR).'mailchimp/';
$mscf_url = trailingslashit(WP_PLUGIN_URL).'mailchimp/';
$mscf_dirbase = trailingslashit(basename(dirname(__FILE__))); // Typically wp-mailchimp/ or mailchimp/
$mscf_dir = trailingslashit(WP_PLUGIN_DIR).$mscf_dirbase;
$mscf_url = trailingslashit(WP_PLUGIN_URL).$mscf_dirbase;

// Try our hands at finding the real location
foreach ($locations as $key => $loc) {
$dir = trailingslashit($loc['dir']).'mailchimp/';
$url = trailingslashit($loc['url']).'mailchimp/';
$dir = trailingslashit($loc['dir']).$mscf_dirbase;
$url = trailingslashit($loc['url']).$mscf_dirbase;
if (is_file($dir.basename(__FILE__))) {
$mscf_dir = $dir;
$mscf_url = $url;
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Expand Up @@ -134,6 +134,10 @@ Fixes major bug with "Settings" link on Plugins screen.
Added support for multiple interest groups, field formatting based on type and date picker.

== Changelog ==
= 1.2.9 =
* Fixed bug where multiple checkbox type interest groups were returning an invalid error
* Fixed but where assets were not enqueueing properly if the plugin directory was not set to 'mailchimp'. Now supports any directory name.

= 1.2.8 =
* Fixed bug where entire phone numbers were only being deposited in the area code portion

Expand Down

0 comments on commit e661356

Please sign in to comment.