MailChimp Forms by MailMunch - Version 2.0.4

Version Description

Download this release

Release Info

Developer mailmunch
Plugin Icon 128x128 MailChimp Forms by MailMunch
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

admin/class-mailchimp-mailmunch-admin.php CHANGED
@@ -153,15 +153,6 @@ class Mailchimp_Mailmunch_Admin {
153
  return $links;
154
  }
155
 
156
- /**
157
- * Register sidebar widget
158
- *
159
- * @since 2.0.0
160
- */
161
- public function sidebar_widget() {
162
- register_widget( 'Mailchimp_Mailmunch_Sidebar_Widget' );
163
- }
164
-
165
  /**
166
  * Get current step
167
  *
@@ -198,7 +189,7 @@ class Mailchimp_Mailmunch_Admin {
198
  break;
199
 
200
  case 'integrate':
201
- if ($_POST['access_token']) {
202
  update_option($this->mailmunch_api->getPrefix(). 'mailchimp_access_token', $_POST['access_token']);
203
  }
204
 
@@ -209,7 +200,7 @@ class Mailchimp_Mailmunch_Admin {
209
  break;
210
 
211
  default:
212
- if ($_POST['list_id']) {
213
  update_option($this->mailmunch_api->getPrefix(). 'mailchimp_list_id', $_POST['list_id']);
214
 
215
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/drewm_mailchimp.php';
153
  return $links;
154
  }
155
 
 
 
 
 
 
 
 
 
 
156
  /**
157
  * Get current step
158
  *
189
  break;
190
 
191
  case 'integrate':
192
+ if (isset($_POST['access_token'])) {
193
  update_option($this->mailmunch_api->getPrefix(). 'mailchimp_access_token', $_POST['access_token']);
194
  }
195
 
200
  break;
201
 
202
  default:
203
+ if (isset($_POST['list_id'])) {
204
  update_option($this->mailmunch_api->getPrefix(). 'mailchimp_list_id', $_POST['list_id']);
205
 
206
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/drewm_mailchimp.php';
includes/class-mailchimp-mailmunch.php CHANGED
@@ -194,9 +194,6 @@ class Mailchimp_Mailmunch {
194
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
195
  $this->loader->add_action( 'admin_menu', $plugin_admin, 'menu' );
196
 
197
- // Sidebar widget
198
- $this->loader->add_action( 'widgets_init', $plugin_admin, 'sidebar_widget' );
199
-
200
  // Ajax calls
201
  $this->loader->add_action( 'wp_ajax_sign_up', $plugin_admin, 'sign_up' );
202
  $this->loader->add_action( 'wp_ajax_sign_in', $plugin_admin, 'sign_in' );
@@ -226,6 +223,9 @@ class Mailchimp_Mailmunch {
226
 
227
  $this->loader->add_filter( 'the_content', $plugin_public, 'add_post_containers' );
228
 
 
 
 
229
  }
230
 
231
  /**
194
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
195
  $this->loader->add_action( 'admin_menu', $plugin_admin, 'menu' );
196
 
 
 
 
197
  // Ajax calls
198
  $this->loader->add_action( 'wp_ajax_sign_up', $plugin_admin, 'sign_up' );
199
  $this->loader->add_action( 'wp_ajax_sign_in', $plugin_admin, 'sign_in' );
223
 
224
  $this->loader->add_filter( 'the_content', $plugin_public, 'add_post_containers' );
225
 
226
+ // Sidebar widget
227
+ $this->loader->add_action( 'widgets_init', $plugin_public, 'sidebar_widget' );
228
+
229
  }
230
 
231
  /**
includes/class-mailmunch-api.php CHANGED
@@ -351,7 +351,7 @@
351
 
352
  if (!$skipTokenAuth) {
353
  $parsedUrl = parse_url($url);
354
- $parseUrlQuery = $parsedUrl['query'];
355
  if (!empty($parseUrlQuery)) {
356
  $url .= '&token='. $this->getUserToken();
357
  }
351
 
352
  if (!$skipTokenAuth) {
353
  $parsedUrl = parse_url($url);
354
+ $parseUrlQuery = isset($parsedUrl['query']) ? $parsedUrl['query'] : null;
355
  if (!empty($parseUrlQuery)) {
356
  $url .= '&token='. $this->getUserToken();
357
  }
mailchimp-mailmunch.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: MailChimp Forms by MailMunch
17
  * Plugin URI: http://connect.mailchimp.com/integrations/mailmunch-email-list-builder
18
  * Description: The MailChimp plugin allows you to quickly and easily add signup forms for your MailChimp lists. Popup, Embedded, Top Bar and a variety of different options available.
19
- * Version: 2.0.3
20
  * Author: MailMunch
21
  * Author URI: http://www.mailmunch.co
22
  * License: GPL-2.0+
16
  * Plugin Name: MailChimp Forms by MailMunch
17
  * Plugin URI: http://connect.mailchimp.com/integrations/mailmunch-email-list-builder
18
  * Description: The MailChimp plugin allows you to quickly and easily add signup forms for your MailChimp lists. Popup, Embedded, Top Bar and a variety of different options available.
19
+ * Version: 2.0.4
20
  * Author: MailMunch
21
  * Author URI: http://www.mailmunch.co
22
  * License: GPL-2.0+
public/class-mailchimp-mailmunch-public.php CHANGED
@@ -59,6 +59,15 @@ class Mailchimp_Mailmunch_Public {
59
  return "<div class='mailmunch-forms-short-code mailmunch-forms-widget-".$atts['id']."' style='display: none !important;'></div>";
60
  }
61
 
 
 
 
 
 
 
 
 
 
62
  /**
63
  * Register the stylesheets for the public-facing side of the site.
64
  *
59
  return "<div class='mailmunch-forms-short-code mailmunch-forms-widget-".$atts['id']."' style='display: none !important;'></div>";
60
  }
61
 
62
+ /**
63
+ * Register sidebar widget
64
+ *
65
+ * @since 2.0.0
66
+ */
67
+ public function sidebar_widget() {
68
+ register_widget( 'Mailchimp_Mailmunch_Sidebar_Widget' );
69
+ }
70
+
71
  /**
72
  * Register the stylesheets for the public-facing side of the site.
73
  *
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: mailchimp,mailchimp form,mailchimp newsletter,mailchimp plugin,newsletter,
4
 
5
  Requires at least: 3.0.1
6
  Tested up to: 4.2
7
- Stable tag: 2.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
 
5
  Requires at least: 3.0.1
6
  Tested up to: 4.2
7
+ Stable tag: 2.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10