MailChimp for WordPress - Version 1.5.5

Version Description

Fixed field generator only generating text input fields.

Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 MailChimp for WordPress
Version 1.5.5
Comparing to
See all releases

Code changes from version 1.5.4 to 1.5.5

assets/js/admin.js CHANGED
@@ -273,9 +273,9 @@
273
  }
274
 
275
  if(fieldTypesMap[data.field_type] != undefined) {
276
- var fieldType = fieldTypesMap[data.field_type];
277
  } else {
278
- var fieldType = 'text';
279
  }
280
 
281
  if(visibleRowsMap[fieldType] != undefined) {
@@ -288,7 +288,6 @@
288
  $wizardFields.find('p.row.' + visibleRows[i]).show();
289
  }
290
 
291
- // populate fields with preset values
292
  fieldType = fieldType;
293
  fieldName = data.tag;
294
 
273
  }
274
 
275
  if(fieldTypesMap[data.field_type] != undefined) {
276
+ fieldType = fieldTypesMap[data.field_type];
277
  } else {
278
+ fieldType = 'text';
279
  }
280
 
281
  if(visibleRowsMap[fieldType] != undefined) {
288
  $wizardFields.find('p.row.' + visibleRows[i]).show();
289
  }
290
 
 
291
  fieldType = fieldType;
292
  fieldName = data.tag;
293
 
includes/class-admin.php CHANGED
@@ -25,7 +25,7 @@ class MC4WP_Lite_Admin
25
  add_action( 'admin_enqueue_scripts', array($this, 'load_css_and_js') );
26
 
27
  register_activation_hook( 'mailchimp-for-wp/mailchimp-for-wp.php', array($this, 'delete_transients') );
28
- register_deactivation_hook( 'mailchimp-for-wp-pro/mailchimp-for-wp-pro.php', array($this, 'delete_transients') );
29
 
30
  add_filter("plugin_action_links_mailchimp-for-wp/mailchimp-for-wp.php", array($this, 'add_settings_link'));
31
 
@@ -75,12 +75,12 @@ class MC4WP_Lite_Admin
75
 
76
  public function build_menu()
77
  {
78
- $required_cap = apply_filters('mc4wp_settings_cap', 'manage_options');
79
- add_menu_page('MailChimp for WP Lite', 'MailChimp for WP', $required_cap, 'mc4wp-lite', array($this, 'show_api_settings'), plugins_url('mailchimp-for-wp/assets/img/menu-icon.png'));
80
- add_submenu_page('mc4wp-lite', 'API Settings - MailChimp for WP Lite', 'MailChimp Settings', $required_cap, 'mc4wp-lite', array($this, 'show_api_settings'));
81
- add_submenu_page('mc4wp-lite', 'Checkbox Settings - MailChimp for WP Lite', 'Checkboxes', $required_cap, 'mc4wp-lite-checkbox-settings', array($this, 'show_checkbox_settings'));
82
- add_submenu_page('mc4wp-lite', 'Form Settings - MailChimp for WP Lite', 'Forms', $required_cap, 'mc4wp-lite-form-settings', array($this, 'show_form_settings'));
83
- add_submenu_page('mc4wp-lite', 'Upgrade to Pro - MailChimp for WP Lite', 'Upgrade to Pro', $required_cap, 'mc4wp-lite-upgrade', array($this, 'redirect_to_pro'));
84
  }
85
 
86
  public function validate_settings( $settings ) {
@@ -92,17 +92,19 @@ class MC4WP_Lite_Admin
92
  return $settings;
93
  }
94
 
95
- public function load_css_and_js($hook)
96
  {
97
- if(!isset($_GET['page']) || stristr($_GET['page'], 'mc4wp-lite') == false) { return; }
 
 
98
 
99
  // css
100
- wp_enqueue_style( 'mc4wp-admin-css', plugins_url('mailchimp-for-wp/assets/css/admin.css') );
101
 
102
  // js
103
- wp_register_script( 'mc4wp-beautifyhtml', MC4WP_LITE_PLUGIN_URL . 'assets/js/beautify-html.js', array('jquery'), MC4WP_LITE_VERSION, true);
104
- wp_register_script('mc4wp-admin-js', MC4WP_LITE_PLUGIN_URL . 'assets/js/admin.js', array('jquery'), false, true);
105
- wp_enqueue_script( array('jquery', 'mc4wp-beautifyhtml', 'mc4wp-admin-js') );
106
  }
107
 
108
  public function get_checkbox_compatible_plugins()
25
  add_action( 'admin_enqueue_scripts', array($this, 'load_css_and_js') );
26
 
27
  register_activation_hook( 'mailchimp-for-wp/mailchimp-for-wp.php', array($this, 'delete_transients') );
28
+ register_deactivation_hook( 'mailchimp-for-wp/mailchimp-for-wp.php', array($this, 'delete_transients') );
29
 
30
  add_filter("plugin_action_links_mailchimp-for-wp/mailchimp-for-wp.php", array($this, 'add_settings_link'));
31
 
75
 
76
  public function build_menu()
77
  {
78
+ $required_cap = apply_filters( 'mc4wp_settings_cap', 'manage_options' );
79
+ add_menu_page( 'MailChimp for WP Lite', 'MailChimp for WP', $required_cap, 'mc4wp-lite', array($this, 'show_api_settings'), MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png' );
80
+ add_submenu_page( 'mc4wp-lite', 'API Settings - MailChimp for WP Lite', 'MailChimp Settings', $required_cap, 'mc4wp-lite', array( $this, 'show_api_settings' ) );
81
+ add_submenu_page( 'mc4wp-lite', 'Checkbox Settings - MailChimp for WP Lite', 'Checkboxes', $required_cap, 'mc4wp-lite-checkbox-settings', array($this, 'show_checkbox_settings' ) );
82
+ add_submenu_page( 'mc4wp-lite', 'Form Settings - MailChimp for WP Lite', 'Forms', $required_cap, 'mc4wp-lite-form-settings', array( $this, 'show_form_settings' ) );
83
+ add_submenu_page( 'mc4wp-lite', 'Upgrade to Pro - MailChimp for WP Lite', 'Upgrade to Pro', $required_cap, 'mc4wp-lite-upgrade', array( $this, 'redirect_to_pro' ) );
84
  }
85
 
86
  public function validate_settings( $settings ) {
92
  return $settings;
93
  }
94
 
95
+ public function load_css_and_js( $hook )
96
  {
97
+ if( ! isset( $_GET['page'] ) || stristr( $_GET['page'], 'mc4wp-lite' ) == false ) {
98
+ return;
99
+ }
100
 
101
  // css
102
+ wp_enqueue_style( 'mc4wp-admin-css', MC4WP_LITE_PLUGIN_URL . 'assets/css/admin.css' );
103
 
104
  // js
105
+ wp_register_script( 'mc4wp-beautifyhtml', MC4WP_LITE_PLUGIN_URL . 'assets/js/beautify-html.js', array( 'jquery' ), MC4WP_LITE_VERSION, true );
106
+ wp_register_script( 'mc4wp-admin-js', MC4WP_LITE_PLUGIN_URL . 'assets/js/admin.js', array( 'jquery' ), false, true );
107
+ wp_enqueue_script( array( 'jquery', 'mc4wp-beautifyhtml', 'mc4wp-admin-js' ) );
108
  }
109
 
110
  public function get_checkbox_compatible_plugins()
includes/views/api-settings.php CHANGED
@@ -9,7 +9,7 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
9
  ?>
10
  <div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
11
 
12
- <h2><img src="<?php echo plugins_url('mailchimp-for-wp/assets/img/menu-icon.png'); ?>" /> MailChimp for WordPress: MailChimp Settings</h2>
13
 
14
  <div id="mc4wp-content">
15
 
9
  ?>
10
  <div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
11
 
12
+ <h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: MailChimp Settings</h2>
13
 
14
  <div id="mc4wp-content">
15
 
includes/views/checkbox-settings.php CHANGED
@@ -8,7 +8,7 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
8
  ?>
9
  <div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
10
 
11
- <h2><img src="<?php echo plugins_url('mailchimp-for-wp/assets/img/menu-icon.png'); ?>" /> MailChimp for WordPress: Checkbox Settings</h2>
12
 
13
  <div id="mc4wp-content">
14
 
8
  ?>
9
  <div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
10
 
11
+ <h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: Checkbox Settings</h2>
12
 
13
  <div id="mc4wp-content">
14
 
includes/views/form-settings.php CHANGED
@@ -6,7 +6,7 @@ if( ! defined("MC4WP_LITE_VERSION") ) {
6
  } ?>
7
  <div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
8
 
9
- <h2><img src="<?php echo plugins_url('mailchimp-for-wp/assets/img/menu-icon.png'); ?>" /> MailChimp for WordPress: Form settings</h2>
10
 
11
  <div id="mc4wp-content">
12
 
6
  } ?>
7
  <div id="mc4wp-<?php echo $tab; ?>" class="wrap mc4wp-settings">
8
 
9
+ <h2><img src="<?php echo MC4WP_LITE_PLUGIN_URL . 'assets/img/menu-icon.png'; ?>" /> MailChimp for WordPress: Form settings</h2>
10
 
11
  <div id="mc4wp-content">
12
 
mailchimp-for-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MailChimp for WordPress Lite
4
  Plugin URI: http://dannyvankooten.com/mailchimp-for-wordpress/
5
  Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website.
6
- Version: 1.5.4
7
  Author: Danny van Kooten
8
  Author URI: http://dannyvanKooten.com
9
  License: GPL v3
@@ -39,7 +39,7 @@ if(!function_exists('is_plugin_active')) {
39
  if(!is_plugin_active('mailchimp-for-wp-pro/mailchimp-for-wp-pro.php')
40
  && !(is_admin() && isset($_GET['action']) && $_GET['action'] == 'activate' && isset($_GET['plugin']) && $_GET['plugin'] == 'mailchimp-for-wp-pro/mailchimp-for-wp-pro.php') ) {
41
 
42
- define("MC4WP_LITE_VERSION", "1.5.4");
43
  define("MC4WP_LITE_PLUGIN_DIR", plugin_dir_path(__FILE__));
44
  define("MC4WP_LITE_PLUGIN_URL", plugins_url( '/' , __FILE__ ) );
45
 
3
  Plugin Name: MailChimp for WordPress Lite
4
  Plugin URI: http://dannyvankooten.com/mailchimp-for-wordpress/
5
  Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website.
6
+ Version: 1.5.5
7
  Author: Danny van Kooten
8
  Author URI: http://dannyvanKooten.com
9
  License: GPL v3
39
  if(!is_plugin_active('mailchimp-for-wp-pro/mailchimp-for-wp-pro.php')
40
  && !(is_admin() && isset($_GET['action']) && $_GET['action'] == 'activate' && isset($_GET['plugin']) && $_GET['plugin'] == 'mailchimp-for-wp-pro/mailchimp-for-wp-pro.php') ) {
41
 
42
+ define("MC4WP_LITE_VERSION", "1.5.5");
43
  define("MC4WP_LITE_PLUGIN_DIR", plugin_dir_path(__FILE__));
44
  define("MC4WP_LITE_PLUGIN_URL", plugins_url( '/' , __FILE__ ) );
45
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://dannyvankooten.com/donate/
4
  Tags: mailchimp,form,shortcode,widget,checkbox,comment,newsletter,buddypress,multisite,bbpress,woocommerce,easy digital downloads,contact form,contact form 7
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
- Stable tag: 1.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -198,6 +198,11 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
198
 
199
  == Changelog ==
200
 
 
 
 
 
 
201
  = 1.5.4 - February 17, 2014 =
202
  * Fixed: "Add to form" button not working
203
  * Improved: Plugin now compatible with custom plugin folder names
@@ -459,6 +464,9 @@ Your theme folder can be found by browsing to `/wp-content/themes/your-theme-nam
459
 
460
  == Upgrade Notice ==
461
 
 
 
 
462
  = 1.5.4 =
463
  Fixed admin notice and "add to form" button, improved Contact Form 7 integration.
464
 
4
  Tags: mailchimp,form,shortcode,widget,checkbox,comment,newsletter,buddypress,multisite,bbpress,woocommerce,easy digital downloads,contact form,contact form 7
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.5.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
198
 
199
  == Changelog ==
200
 
201
+ = 1.5.5 - February 25, 2014 =
202
+ * Fixed: Field generator only generating text fields
203
+ * Fixed: Now using correct deactivation hook
204
+ * Improved: Plugin now fully compatible with custom folder names
205
+
206
  = 1.5.4 - February 17, 2014 =
207
  * Fixed: "Add to form" button not working
208
  * Improved: Plugin now compatible with custom plugin folder names
464
 
465
  == Upgrade Notice ==
466
 
467
+ = 1.5.5 =
468
+ Fixed field generator only generating `text` input fields.
469
+
470
  = 1.5.4 =
471
  Fixed admin notice and "add to form" button, improved Contact Form 7 integration.
472