MailChimp Forms by MailMunch - Version 2.1.2

Version Description

Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

admin/class-mailchimp-mailmunch-admin.php CHANGED
@@ -249,19 +249,9 @@ class Mailchimp_Mailmunch_Admin {
249
  default:
250
  if (isset($_POST['list_id'])) {
251
  update_option($this->mailmunch_api->getPrefix(). 'mailchimp_list_id', $_POST['list_id']);
252
-
253
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/drewm_mailchimp.php';
254
- $mailchimpApi = new DrewmMailChimp(get_option($this->mailmunch_api->getPrefix(). 'mailchimp_access_token'));
255
- $lists = $mailchimpApi->call('lists/list');
256
- $listName = '';
257
- if ($lists['total'] > 0) {
258
- foreach ($lists['data'] as $list) {
259
- if ($list['id'] == $_POST['list_id'] ) { $listName = $list['name']; }
260
- }
261
- }
262
  $accessToken = get_option($this->mailmunch_api->getPrefix(). 'mailchimp_access_token');
263
 
264
- $this->mailmunch_api->createListAndIntegration($accessToken, $listName, $_POST['list_id']);
265
  }
266
  require_once(plugin_dir_path( __FILE__ ) . 'partials/mailchimp-mailmunch-admin-display.php');
267
  }
249
  default:
250
  if (isset($_POST['list_id'])) {
251
  update_option($this->mailmunch_api->getPrefix(). 'mailchimp_list_id', $_POST['list_id']);
 
 
 
 
 
 
 
 
 
 
252
  $accessToken = get_option($this->mailmunch_api->getPrefix(). 'mailchimp_access_token');
253
 
254
+ $this->mailmunch_api->createIntegration($accessToken, $_POST['list_id']);
255
  }
256
  require_once(plugin_dir_path( __FILE__ ) . 'partials/mailchimp-mailmunch-admin-display.php');
257
  }
admin/partials/mailchimp-mailmunch-integrate.php CHANGED
@@ -35,7 +35,7 @@
35
  <option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
36
  <?php } ?>
37
  </select>
38
- <input type="submit" name="action" value="Choost List" class="button button-primary" />
39
  </form>
40
  <?php } else { ?>
41
  <img src="<?php echo plugins_url( 'img/warning.png', dirname(__FILE__) ) ?>" />
35
  <option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
36
  <?php } ?>
37
  </select>
38
+ <input type="submit" name="action" value="Choose List" class="button button-primary" />
39
  </form>
40
  <?php } else { ?>
41
  <img src="<?php echo plugins_url( 'img/warning.png', dirname(__FILE__) ) ?>" />
includes/class-mailchimp-mailmunch.php CHANGED
@@ -18,7 +18,7 @@ define( 'MAILCHIMP_MAILMUNCH_URL', "http://wordpress.mailmunch.co" );
18
  define( 'MAILCHIMP_MAILMUNCH_HOME_URL', "http://app.mailmunch.co" );
19
  define( 'MAILCHIMP_MAILMUNCH_SLUG', "mailchimp-mailmunch" );
20
  define( 'MAILCHIMP_MAILMUNCH_PREFIX', 'mc_mm' );
21
- define( 'MAILCHIMP_MAILMUNCH_VERSION', '2.1.1' );
22
 
23
  /**
24
  * The core plugin class.
18
  define( 'MAILCHIMP_MAILMUNCH_HOME_URL', "http://app.mailmunch.co" );
19
  define( 'MAILCHIMP_MAILMUNCH_SLUG', "mailchimp-mailmunch" );
20
  define( 'MAILCHIMP_MAILMUNCH_PREFIX', 'mc_mm' );
21
+ define( 'MAILCHIMP_MAILMUNCH_VERSION', '2.1.2' );
22
 
23
  /**
24
  * The core plugin class.
includes/class-mailmunch-api.php CHANGED
@@ -94,50 +94,31 @@
94
  return json_decode($request['body']);
95
  }
96
 
97
- function createListAndIntegration($accessToken, $listName, $externalListId) {
98
- $list = $this->createList($listName);
99
- if ($list) {
100
- $site = $this->getSite();
101
- if (!empty($site)) {
102
- $integration = $this->createIntegration($site->id, $list->id, $accessToken, $externalListId );
103
- return $integration;
104
- }
105
- }
106
- return false;
107
- }
108
-
109
  function findOrCreateSite() {
110
  $site = $this->getSite();
111
  if (empty($site)) {
112
- $site = $this->createSite(get_bloginfo(), home_url());
 
 
 
113
  if (!empty($site)) $this->setSiteId($site->id);
114
  }
115
  return $site;
116
  }
117
 
118
- function createIntegration($siteId, $listId, $accessToken, $externalListId) {
119
- $this->requestType = 'post';
120
- $response = $this->ping('/wordpress/integrations/mailchimp', array(
121
- 'site_id' => $siteId,
122
- 'list_id' => $listId,
123
- 'access_token' => $accessToken,
124
- 'active_list_id' => $externalListId
125
- ));
126
- $site = json_decode($response['body']);
127
- return $site;
128
- }
129
-
130
- function createList($listName, $siteId=null) {
131
- if (empty($listName)) $listName = 'General';
132
- if (empty($siteId)) { $siteId = $this->getSiteId(); }
133
- $this->requestType = 'post';
134
- $response = $this->ping('/sites/'. $siteId. '/lists', array(
135
- 'list' => array(
136
- 'name' => $listName,
137
- )
138
- ));
139
- $list = json_decode($response['body']);
140
- return $list;
141
  }
142
 
143
  function createSite($siteName, $domain) {
94
  return json_decode($request['body']);
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  function findOrCreateSite() {
98
  $site = $this->getSite();
99
  if (empty($site)) {
100
+ $siteName = get_bloginfo();
101
+ $decodedSiteName = html_entity_decode($siteName, ENT_QUOTES);
102
+ $decodedSiteName = stripslashes($decodedSiteName);
103
+ $site = $this->createSite($decodedSiteName, home_url());
104
  if (!empty($site)) $this->setSiteId($site->id);
105
  }
106
  return $site;
107
  }
108
 
109
+ function createIntegration($accessToken, $externalListId) {
110
+ $siteId = $this->getSiteId();
111
+ if (!empty($siteId)) {
112
+ $this->requestType = 'post';
113
+ $response = $this->ping('/wordpress/integrations/mailchimp', array(
114
+ 'site_id' => $siteId,
115
+ 'access_token' => $accessToken,
116
+ 'active_list_id' => $externalListId
117
+ ));
118
+ $integration = json_decode($response['body']);
119
+ return $integration;
120
+ }
121
+ return false;
 
 
 
 
 
 
 
 
 
 
122
  }
123
 
124
  function createSite($siteName, $domain) {
mailchimp-mailmunch.php CHANGED
@@ -16,12 +16,12 @@
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.1.1
20
  * Author: MailMunch
21
  * Author URI: http://www.mailmunch.co
22
  * License: GPL-2.0+
23
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24
- * Text Domain: mailchimp-mailmunch
25
  * Domain Path: /languages
26
  */
27
 
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.1.2
20
  * Author: MailMunch
21
  * Author URI: http://www.mailmunch.co
22
  * License: GPL-2.0+
23
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24
+ * Text Domain: mailchimp-forms-by-mailmunch
25
  * Domain Path: /languages
26
  */
27
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mailmunch
3
  Tags: mailchimp,mailchimp form,mailchimp newsletter,mailchimp plugin,newsletter,newsletter form, optin form, form, mailchimp signup, mailchimp signup forms, signup form, mailchimp widget, email form, leads, mailchimp subscribe
4
 
5
  Requires at least: 3.0.1
6
- Tested up to: 4.2
7
- Stable tag: 2.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,13 +12,13 @@ The #1 MailChimp plugin to get more email subscribers. Easily add MailChimp sign
12
 
13
  == Description ==
14
 
15
- > MailChimp Forms by MailMunch allows you to painlessly add MailChimp sign up forms to your WordPress site. The MailChimp form captures the lead and sends it to specific MailChimp lists automatically. You can set it to no op-in, opt-in, or double opt-in. You can add MailChimp forms to posts, pages or sidebar, and also open it as a popup or top bar. Simply sign up and connect your MailChimp account into the plugin admin settings and it will pull in all your MailChimp lists. From there you can choose the lists you want to make MailChimp forms for.
16
 
17
  What is [MailChimp](http://www.mailchimp.com/)? MailChimp is one of the best email marketing tools. Signup up for a [FREE Trial Account](http://www.mailchimp.com/signup/) and see for yourself!
18
 
19
  [vimeo http://vimeo.com/117103275]
20
 
21
- Our improved signup plugin for MailChimp will proactively sign-up new subscribers to your MailChimp newsletter list. Our forms offer the same basic features that MailChimp's official plugin, but also much more. In addition to the form, analytics will help you track the number of form views and subscriptions.
22
 
23
  = Sign-Up Forms =
24
  Easily create sign-up forms for your MailChimp list and display it as a popup, embedded widget or a top bar.
@@ -35,8 +35,6 @@ Easily create sign-up forms for your MailChimp list and display it as a popup, e
35
  * Add MailChimp forms to posts, pages, or categories
36
  * Set forms to single or double opt-in for MailChimp
37
  * Send MailChimp welcome email
38
- * Customize the success message and submit button text
39
- * Redirect users to a page on submission
40
  * Un-subscribe users from MailChimp lists
41
  * View subscriber MailChimp profiles
42
  * View individual MailChimp form subscriber count
@@ -70,7 +68,7 @@ If you are using Wordpress v3.0 or higher, you can use the short-code given duri
70
  To learn more, just check out: [MailChimp](http://mailchimp.com/features/all/)
71
 
72
  = Do I need to have a MailChimp Account? =
73
- Yes, you can register on MailChimp at [MailChimp](https://mailchimp.com/sign up/ "MailChimp Signup").
74
 
75
  = Do I need to have lists already set up in MailChimp? =
76
  Yes, you have to have at least 1 list set up in MailChimp.
@@ -149,8 +147,7 @@ Why people use MailChimp
149
 
150
  = About MailChimp =
151
 
152
- [MailChimp](http://mailchimp.com/) is currently used by more than seven million businesses and people throughout the world. The features and integrations of MailChimp allow you to send out automated messages, marketing emails, as well as different targeted campaigns. MailChimp has been in business since the year 2001. Since that time MailChimp has grown and now there are more than 500 million emails sent through MailChimp each day.
153
- MailChimp is a simple email marketing software. So many MailChimp users cannot be wrong. If you are creating an email newsletter, MailChimp can help. MailChimp is a platform to create, design, and publish your newsletters.
154
 
155
  With MailChimp you can build a list of email subscribers. MailChimp allows you to customize templates. MailChimp is the best email marketing platform. The pricing is affordable, making MailChimp perfect.
156
 
@@ -166,6 +163,9 @@ With MailChimp you can build a list of email subscribers. MailChimp allows you t
166
 
167
  == Changelog ==
168
 
 
 
 
169
  = MailChimp Forms 2.1.1 =
170
  * Improved MailChimp Widget
171
 
@@ -180,6 +180,27 @@ With MailChimp you can build a list of email subscribers. MailChimp allows you t
180
  = MailChimp Forms 2.0.8 =
181
  * More MailChimp form themes
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = MailChimp Forms 2.0.0 =
184
  * Brand New: Faster and more reliable MailChimp forms
185
 
@@ -191,3 +212,105 @@ With MailChimp you can build a list of email subscribers. MailChimp allows you t
191
 
192
  = MailChimp Forms 1.0.1 =
193
  * The first version of MailChimp Forms WordPress plugin by MailMunch
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Tags: mailchimp,mailchimp form,mailchimp newsletter,mailchimp plugin,newsletter,newsletter form, optin form, form, mailchimp signup, mailchimp signup forms, signup form, mailchimp widget, email form, leads, mailchimp subscribe
4
 
5
  Requires at least: 3.0.1
6
+ Tested up to: 4.3.1
7
+ Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ > MailChimp Forms by MailMunch allows you to painlessly add MailChimp sign up forms to your WordPress site. The MailChimp form captures the lead and sends it to specific MailChimp lists automatically. You can set it to no op-in, opt-in, or double opt-in. You can add MailChimp forms to posts, pages or sidebar, and also open it as a popup or top bar. Simply sign up and connect your MailChimp account into the plugin admin settings and it will pull in all your MailChimp lists. From there you can choose the MailChimp lists you want to make MailChimp forms for.
16
 
17
  What is [MailChimp](http://www.mailchimp.com/)? MailChimp is one of the best email marketing tools. Signup up for a [FREE Trial Account](http://www.mailchimp.com/signup/) and see for yourself!
18
 
19
  [vimeo http://vimeo.com/117103275]
20
 
21
+ Our improved signup plugin for MailChimp will proactively sign-up new subscribers to your MailChimp newsletter list. Our MailChimp forms offer the same basic features that MailChimp's official plugin, but also much more. In addition to the form, analytics will help you track the number of form views and subscriptions.
22
 
23
  = Sign-Up Forms =
24
  Easily create sign-up forms for your MailChimp list and display it as a popup, embedded widget or a top bar.
35
  * Add MailChimp forms to posts, pages, or categories
36
  * Set forms to single or double opt-in for MailChimp
37
  * Send MailChimp welcome email
 
 
38
  * Un-subscribe users from MailChimp lists
39
  * View subscriber MailChimp profiles
40
  * View individual MailChimp form subscriber count
68
  To learn more, just check out: [MailChimp](http://mailchimp.com/features/all/)
69
 
70
  = Do I need to have a MailChimp Account? =
71
+ Yes, you can register on MailChimp at [MailChimp](https://login.mailchimp.com/signup). MailChimp has a free plan.
72
 
73
  = Do I need to have lists already set up in MailChimp? =
74
  Yes, you have to have at least 1 list set up in MailChimp.
147
 
148
  = About MailChimp =
149
 
150
+ [MailChimp](http://mailchimp.com/) is currently used by more than seven million businesses and people throughout the world. The features and integrations of MailChimp allow you to send out automated messages, marketing emails, as well as different targeted campaigns. MailChimp has been in business since the year 2001. Since that time MailChimp has grown and now there are more than 500 million emails sent through MailChimp each day. MailChimp is a simple email marketing software. So many MailChimp users cannot be wrong. If you are creating an email newsletter, MailChimp can help. MailChimp is a platform to create, design, and publish your newsletters.
 
151
 
152
  With MailChimp you can build a list of email subscribers. MailChimp allows you to customize templates. MailChimp is the best email marketing platform. The pricing is affordable, making MailChimp perfect.
153
 
163
 
164
  == Changelog ==
165
 
166
+ = MailChimp Forms 2.1.2 =
167
+ * Fixed MailChimp typo
168
+
169
  = MailChimp Forms 2.1.1 =
170
  * Improved MailChimp Widget
171
 
180
  = MailChimp Forms 2.0.8 =
181
  * More MailChimp form themes
182
 
183
+ = MailChimp Forms 2.0.7 =
184
+ * Fixed MailChimp API wrapper class file
185
+
186
+ = MailChimp Forms 2.0.6 =
187
+ * MailChimp API update
188
+
189
+ = MailChimp Forms 2.0.5 =
190
+ * MailChimp email
191
+
192
+ = MailChimp Forms 2.0.4 =
193
+ * MailChimp automation
194
+
195
+ = MailChimp Forms 2.0.3 =
196
+ * MailChimp interests
197
+
198
+ = MailChimp Forms 2.0.2 =
199
+ * MailChimp lists
200
+
201
+ = MailChimp Forms 2.0.1 =
202
+ * MailChimp groups
203
+
204
  = MailChimp Forms 2.0.0 =
205
  * Brand New: Faster and more reliable MailChimp forms
206
 
212
 
213
  = MailChimp Forms 1.0.1 =
214
  * The first version of MailChimp Forms WordPress plugin by MailMunch
215
+
216
+ = MailChimp Playground (2015-10-22) =
217
+ * MailChimp Forms API playground
218
+
219
+ = MailChimp Milestone (2014-06-03) =
220
+ * 10 billion emails per month
221
+
222
+ = MailChimp Mobile (2013-04-29) =
223
+ * Responsive MailChimp
224
+
225
+ = MailChimp Team Features (2013-04-29) =
226
+ * Collaboration features for MailChimp campaigns
227
+
228
+ = MailChimp Multi-User (2013-02-05) =
229
+ * MailChimp v8: Multi-user accounts
230
+ * MailChimp user permissions
231
+
232
+ = MailChimp v7.9 (2013-01-07) =
233
+ * New MailChimp Campaign features
234
+ * Easily find MailChimp subscribers
235
+ * MailChimp form language tags
236
+ * MailChimp advanced filters
237
+
238
+ = MailChimp Subscribers (2012-11-05) =
239
+ * Faster MailChimp subscriber search
240
+
241
+ = MailChimp Editor (2012-11-02) =
242
+ * New Mailchimp Editor with drag and drop
243
+ * MailChimp Newsletter designs
244
+
245
+ = New MailChimp (2012-04-26) =
246
+ * MailChimp 7.1 rolling out
247
+
248
+ = MailChimp Integrations (2011-05-05) =
249
+ * MailChimp Integrations directory
250
+
251
+ = MailChimp Autoresponders (2012-10-26) =
252
+ * MailChimp autoresponder triggers
253
+ * MailChimp autoresponder kick off
254
+ * MailChimp instant delivery
255
+ * MailChimp scheduling
256
+
257
+ = MailChimp Autoresponders (2012-07-24) =
258
+ * MailChimp v7.4 bug squash
259
+
260
+ = MailChimp API 1.3.0 (2010-11-15) =
261
+ * MailChimp API v1.3.0 released
262
+ * MailChimp API v1.1.x deprecated
263
+ * MailChimp API v1.2.x frozen
264
+ * Added List Activity API
265
+
266
+ = MailChimp API 1.2.7 (2010-07-13) =
267
+ * MailChimp API v1.2.7 released
268
+
269
+ = MailChimp API 1.2.6 (2010-05-06) =
270
+ * MailChimp API v1.2.6 released
271
+ * Added List Interests API
272
+
273
+ = MailChimp API 1.2.5 (2010-02-01) =
274
+ * MailChimp API v1.2.5 released
275
+ * listsForEmail() and campaignGeoOpens() APIs
276
+
277
+ = MailChimp API 1.2.4 (2009-11-24) =
278
+ * MailChimp API v1.2.4 released
279
+
280
+ = MailChimp API 1.2.3 (2009-10-26) =
281
+ * MailChimp API v1.2.3 released
282
+ * Campaign reports API added
283
+
284
+ = MailChimp API 1.2.2 (2009-08-17) =
285
+ * MailChimp API v1.2.2 released
286
+ * Added account details API
287
+
288
+ = MailChimp API 1.2.1 (2009-06-08) =
289
+ * MailChimp API v1.2.1 released
290
+ * Added webhooks to list methods
291
+
292
+ = MailChimp API 1.2.0 (2009-03-29) =
293
+ * MailChimp API v1.2.0 released
294
+ * update_existing parameter added
295
+
296
+ = MailChimp API 1.1.2 (2008-11-21) =
297
+ * MailChimp API v1.1.2 released
298
+
299
+ = MailChimp API 1.1.1 (2008-10-10) =
300
+ * MailChimp API v1.1.1 released
301
+
302
+ = MailChimp API 1.1.0 (2008-08-08) =
303
+ * MailChimp API v1.1.0 release
304
+ * Security fixes and new additions
305
+
306
+ = MailChimp API 1.0 Frozen (2008-06-20) =
307
+ * MailChimp API v1.0 frozen
308
+ * MailChimp API v1.1 work started
309
+
310
+ = MailChimp API 1.0.1 (2008-05-19) =
311
+ * MailChimp API v1.0.1 released
312
+ * campaignCreate() and listMembers() added
313
+
314
+ = MailChimp API 1.0 (2007-11-14) =
315
+ * MailChimp API v1.0 released
316
+ * lists() and campaigns() added