MailChimp Forms by MailMunch - Version 2.0.8

Version Description

Download this release

Release Info

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

Code changes from version 2.0.7 to 2.0.8

admin/class-mailchimp-mailmunch-admin.php CHANGED
@@ -142,6 +142,23 @@ class Mailchimp_Mailmunch_Admin {
142
  public function menu() {
143
  add_options_page( $this->integration_name, $this->integration_name, 'manage_options', MAILCHIMP_MAILMUNCH_SLUG, array($this, 'get_dashboard_html'));
144
  add_menu_page( $this->integration_name, $this->integration_name, 'manage_options', MAILCHIMP_MAILMUNCH_SLUG, array($this, 'get_dashboard_html'), plugins_url( 'img/icon.png', __FILE__ ), 103.786);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  }
146
 
147
  /**
@@ -150,7 +167,7 @@ class Mailchimp_Mailmunch_Admin {
150
  * @since 2.0.0
151
  */
152
  public function settings_link($links) {
153
- $settings_link = '<a href="options-general.php?page='.MAILCHIMP_MAILMUNCH_SLUG.'">Settings</a>';
154
  array_unshift($links, $settings_link);
155
  return $links;
156
  }
@@ -185,6 +202,20 @@ class Mailchimp_Mailmunch_Admin {
185
  }
186
  return $this->mailmunch_api;
187
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  /**
189
  * Get Dashboard HTML
190
  *
142
  public function menu() {
143
  add_options_page( $this->integration_name, $this->integration_name, 'manage_options', MAILCHIMP_MAILMUNCH_SLUG, array($this, 'get_dashboard_html'));
144
  add_menu_page( $this->integration_name, $this->integration_name, 'manage_options', MAILCHIMP_MAILMUNCH_SLUG, array($this, 'get_dashboard_html'), plugins_url( 'img/icon.png', __FILE__ ), 103.786);
145
+
146
+ add_submenu_page( MAILCHIMP_MAILMUNCH_SLUG, $this->integration_name, 'Forms', 'manage_options', MAILCHIMP_MAILMUNCH_SLUG, array($this, 'get_dashboard_html') );
147
+ add_submenu_page( MAILCHIMP_MAILMUNCH_SLUG, $this->integration_name. ' Settings', 'Settings', 'manage_options', MAILCHIMP_MAILMUNCH_SLUG. '-settings', array($this, 'settings_page') );
148
+ }
149
+
150
+ /**
151
+ * Activation notice for admin area
152
+ *
153
+ * @since 2.0.8
154
+ */
155
+ function activation_notice() {
156
+ $current_screen = get_current_screen();
157
+ $siteId = get_option(MAILCHIMP_MAILMUNCH_PREFIX. '_'. 'site_id');
158
+
159
+ if (empty($siteId) && strpos($current_screen->id, MAILCHIMP_MAILMUNCH_SLUG) == false) {
160
+ echo '<div class="updated"><p>'.$this->plugin_name.' is activated. <a href="admin.php?page='.MAILCHIMP_MAILMUNCH_SLUG.'">Click here</a> to create your first form.</p></div>';
161
+ }
162
  }
163
 
164
  /**
167
  * @since 2.0.0
168
  */
169
  public function settings_link($links) {
170
+ $settings_link = '<a href="admin.php?page='.MAILCHIMP_MAILMUNCH_SLUG.'">Settings</a>';
171
  array_unshift($links, $settings_link);
172
  return $links;
173
  }
202
  }
203
  return $this->mailmunch_api;
204
  }
205
+
206
+ /**
207
+ * Settings Page
208
+ *
209
+ * @since 2.0.8
210
+ */
211
+ public function settings_page() {
212
+ $this->initiate_api();
213
+ if ($_POST) {
214
+ $this->mailmunch_api->setSetting('auto_embed', $_POST['auto_embed']);
215
+ }
216
+ require_once(plugin_dir_path(__FILE__) . 'partials/mailchimp-mailmunch-settings.php');
217
+ }
218
+
219
  /**
220
  * Get Dashboard HTML
221
  *
admin/css/mailchimp-mailmunch-admin.css CHANGED
@@ -45,6 +45,16 @@
45
  text-align: center;
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
48
  .mailchimp-status {
49
  margin-bottom: 15px;
50
  }
45
  text-align: center;
46
  }
47
 
48
+ .settings-table .inside-container p {
49
+ font-size: 11px;
50
+ padding: 0px 12px;
51
+ color: #999;
52
+ }
53
+
54
+ .settings-table .button {
55
+ margin: 0px 12px 12px;
56
+ }
57
+
58
  .mailchimp-status {
59
  margin-bottom: 15px;
60
  }
admin/partials/mailchimp-mailmunch-settings.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form method="POST" id="mailchimp-settings">
2
+ <?php $autoEmbed = $this->mailmunch_api->getSetting('auto_embed'); ?>
3
+ <div id="poststuff" class="wrap">
4
+ <div id="post-body" class="metabox-holder columns-2">
5
+ <div id="post-body-content">
6
+ <h2>
7
+ Settings | <?php echo $this->plugin_name; ?>
8
+ </h2>
9
+
10
+ <table class="wp-list-table widefat fixed posts settings-table">
11
+ <tbody>
12
+ <tr>
13
+ <td class="inside-container" width="30%">
14
+ <h3>Auto Embedding</h3>
15
+ <p>If enabled, it will add blank div tags in your posts and pages so you can embed forms more easily.</p>
16
+ </td>
17
+ <td class="setting">
18
+ <select name="auto_embed">
19
+ <option value="yes"<?php if ($autoEmbed == 'yes' || empty($autoEmbed)) echo "selected=\"selected\""; ?>>Yes</option>
20
+ <option value="no"<?php if ($autoEmbed == 'no') echo "selected=\"selected\""; ?>>No</option>
21
+ </select>
22
+ </td>
23
+ </tr>
24
+ <tr>
25
+ <td colspan="2">
26
+ <input type="submit" name="Save" value="Save Settings" class="button button-primary" />
27
+ </td>
28
+ </tr>
29
+ </tbody>
30
+ </table>
31
+ </div>
32
+
33
+ <div id="postbox-container-1" class="postbox-container">
34
+ <div id="side-sortables" class="meta-box-sortables ui-sortable">
35
+ <div class="postbox">
36
+ <h3><span>Need Support?</span></h3>
37
+
38
+ <div class="inside">
39
+ <p>Need Help? <a href="https://mailmunch.zendesk.com/hc" target="_blank">Contact Support</a></p>
40
+
41
+ <div class="video-trigger">
42
+ <p>Watch our quick tour video:</p>
43
+ <img src="<?php echo plugins_url( 'img/video.jpg', dirname(__FILE__) ) ?>" onclick="showVideo()" />
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </form>
includes/class-mailchimp-mailmunch.php CHANGED
@@ -15,10 +15,10 @@
15
 
16
  // Define some class constants.
17
  define( 'MAILCHIMP_MAILMUNCH_URL', "http://wordpress.mailmunch.co" );
18
- define( 'MAILCHIMP_MAILMUNCH_HOME_URL', "http://www.mailmunch.co" );
19
  define( 'MAILCHIMP_MAILMUNCH_SLUG', "mailchimp-mailmunch" );
20
  define( 'MAILCHIMP_MAILMUNCH_PREFIX', 'mc_mm' );
21
- define( 'MAILCHIMP_MAILMUNCH_VERSION', '2.0.7' );
22
 
23
  /**
24
  * The core plugin class.
@@ -194,6 +194,7 @@ class Mailchimp_Mailmunch {
194
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
195
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
196
  $this->loader->add_action( 'admin_menu', $plugin_admin, 'menu' );
 
197
 
198
  // Ajax calls
199
  $this->loader->add_action( 'wp_ajax_sign_up', $plugin_admin, 'sign_up' );
@@ -222,7 +223,10 @@ class Mailchimp_Mailmunch {
222
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
223
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
224
 
225
- $this->loader->add_filter( 'the_content', $plugin_public, 'add_post_containers' );
 
 
 
226
 
227
  // Sidebar widget
228
  $this->loader->add_action( 'widgets_init', $plugin_public, 'sidebar_widget' );
15
 
16
  // Define some class constants.
17
  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.0.8' );
22
 
23
  /**
24
  * The core plugin class.
194
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
195
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
196
  $this->loader->add_action( 'admin_menu', $plugin_admin, 'menu' );
197
+ $this->loader->add_action( 'admin_notices', $plugin_admin, 'activation_notice' );
198
 
199
  // Ajax calls
200
  $this->loader->add_action( 'wp_ajax_sign_up', $plugin_admin, 'sign_up' );
223
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
224
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
225
 
226
+ $autoEmbed = get_option(MAILCHIMP_MAILMUNCH_PREFIX. '_auto_embed');
227
+ if (empty($autoEmbed) || $autoEmbed == 'yes') {
228
+ $this->loader->add_filter( 'the_content', $plugin_public, 'add_post_containers' );
229
+ }
230
 
231
  // Sidebar widget
232
  $this->loader->add_action( 'widgets_init', $plugin_public, 'sidebar_widget' );
includes/class-mailmunch-api.php CHANGED
@@ -24,6 +24,14 @@
24
  }
25
  }
26
 
 
 
 
 
 
 
 
 
27
  function getUserToken() {
28
  return get_option($this->getPrefix(). 'user_token');
29
  }
24
  }
25
  }
26
 
27
+ function getSetting($settingName) {
28
+ return get_option($this->getPrefix(). $settingName);
29
+ }
30
+
31
+ function setSetting($settingName, $value=null) {
32
+ return update_option($this->getPrefix(). $settingName, $value);
33
+ }
34
+
35
  function getUserToken() {
36
  return get_option($this->getPrefix(). 'user_token');
37
  }
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.7
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.8
20
  * Author: MailMunch
21
  * Author URI: http://www.mailmunch.co
22
  * License: GPL-2.0+
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.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,7 +12,7 @@ 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 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
 
@@ -51,7 +51,7 @@ This section describes how to install the MailChimp plugin and get started using
51
 
52
  = Version 2.8+ =
53
  1. Unzip our archive and upload the entire `mailchimp-mailmunch` directory to your `/wp-content/plugins/` directory
54
- 2. Activate the plugin through the 'Plugins' menu in WordPress
55
  3. Look for "MailChimp" in the WordPress admin menu and click it
56
  4. Sign up and create your first MailChimp optin form
57
  5. Choose the MailChimp optin form type: Popover, Embedded or Top Bar
@@ -95,9 +95,42 @@ Absolutely not. MailChimp by MailMunch is designed with high performance and sca
95
  = How many more emails will list builder help me get? =
96
  Most people see a 100% to 500% growth in their MailChimp email subscribers.
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  == Other Notes ==
99
 
100
- Our MailChimp email newsletter list builder helps WordPress users build their audiences online.
101
 
102
  Why people use MailChimp
103
 
@@ -109,6 +142,17 @@ Why people use MailChimp
109
  * MailChimp has better list management
110
  * MailChimp has great error messaging
111
  * MailChimp has interest groups/segments
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  == Screenshots ==
114
 
@@ -116,17 +160,23 @@ Why people use MailChimp
116
  2. The second step is configuring your MailChimp form for things like when to show it, how often to show it, and where to go after they subscribe
117
  3. This is the integration step where you can connect your MailChimp account
118
  4. This is the final step where you can publish your MailChimp form to all or selected posts, categories or pages
119
- 5. And finally, we have the MailChimp form working live on your blog - increasing your MailChimp subscribers :)
120
- 6. A MailChimp connected form example from a user site
121
- 7. Another MailChimp connected example from a user site
122
 
123
  == Changelog ==
124
 
125
- = 1.0.9 =
 
 
 
 
 
 
126
  * Faster MailChimp forms
127
 
128
- = 1.0.5 =
129
  * More MailChimp features
130
 
131
- = 1.0.1 =
132
  * The first version of MailChimp Forms WordPress plugin by MailMunch
4
 
5
  Requires at least: 3.0.1
6
  Tested up to: 4.2
7
+ Stable tag: 2.0.8
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 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
 
51
 
52
  = Version 2.8+ =
53
  1. Unzip our archive and upload the entire `mailchimp-mailmunch` directory to your `/wp-content/plugins/` directory
54
+ 2. Activate the MailChimp plugin through the 'Plugins' menu in WordPress
55
  3. Look for "MailChimp" in the WordPress admin menu and click it
56
  4. Sign up and create your first MailChimp optin form
57
  5. Choose the MailChimp optin form type: Popover, Embedded or Top Bar
95
  = How many more emails will list builder help me get? =
96
  Most people see a 100% to 500% growth in their MailChimp email subscribers.
97
 
98
+ = How to display a MailChimp form in my template files? =
99
+ You can display shortcodes using `echo do_shortcode([SHORTCODE])`.
100
+
101
+ Example:
102
+ `<?php echo do_shortcode( '[mailmunch-form id=79669]' ) ?>`
103
+
104
+ = Does this plugin work with MailChimp groups? =
105
+ Yes. You can choose which MailChimp group to add subscribers to.
106
+
107
+ = Which MailChimp form type is right for me? =
108
+ We have a few great MailChimp form options:
109
+
110
+ 1. Popup MailChimp form: Most effective way to grow your MailChimp list.
111
+ 2. Embedded MailChimp form: Embed MailChimp forms any where in posts or pages.
112
+ 3. Sidebar MailChimp form: If you have a sidebar, add a MailChimp sidebar widget there.
113
+ 4. Top Bar MailChimp form: Add a MailChimp form as a top or bottom bar.
114
+ 5. Scroll Box MailChimp form: Politely slides when a user scrolls your page.
115
+
116
+ = How to add MailChimp forms to my site? =
117
+ You can add MailChimp opt-in forms to your site by going to MailChimp Forms by MailMunch. Choose a MailChimp form type, then choose a layout and modify the text, colors and design using the point & click editor. Now, connect to the MailChimp API and integrate. You are ready to publish your MailChimp form. Go MailChimp!
118
+
119
+ = How to add a MailChimp sidebar widget? =
120
+ To create your MailChimp Sidebar widget, go to your Appearance > Widgets. Then, drag MailChimp Forms widget to your sidebar and expand it and choose or create your MailChimp form.
121
+
122
+ = Do your MailChimp forms work on mobile devices? =
123
+ Yes. Our MailChimp popups, MailChimp embed forms, MailChimp sidebar widgets and MailChimp top bars are fully designed to work on mobile.
124
+
125
+ = How does the MailChimp form analytics feature work? =
126
+ MailChimp provides complete analytics on your MailChimp forms and MailChimp subscribers.
127
+
128
+ = How is this MailChimp plugin better than other MailChimp plugins? =
129
+ This MailChimp plugin is the easiest, fastest and best form builder. Try other MailChimp plugins and then try ours.
130
+
131
  == Other Notes ==
132
 
133
+ Our MailChimp email newsletter list builder helps WordPress users build their audiences on MailChimp.
134
 
135
  Why people use MailChimp
136
 
142
  * MailChimp has better list management
143
  * MailChimp has great error messaging
144
  * MailChimp has interest groups/segments
145
+ * MailChimp has marketing automation
146
+ * MailChimp has subscriber profiles
147
+ * MailChimp has send time optimization
148
+ * MailChimp API is solid
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
 
157
  == Screenshots ==
158
 
160
  2. The second step is configuring your MailChimp form for things like when to show it, how often to show it, and where to go after they subscribe
161
  3. This is the integration step where you can connect your MailChimp account
162
  4. This is the final step where you can publish your MailChimp form to all or selected posts, categories or pages
163
+ 5. And we have the MailChimp form working live on your blog - increasing your MailChimp subscribers :)
164
+ 6. A MailChimp connected form example
165
+ 7. Another MailChimp connected example
166
 
167
  == Changelog ==
168
 
169
+ = MailChimp Forms 2.0.8 =
170
+ * More MailChimp form themes
171
+
172
+ = MailChimp Forms 2.0.0 =
173
+ * Brand New: Faster and more reliable MailChimp forms
174
+
175
+ = MailChimp Forms 1.0.9 =
176
  * Faster MailChimp forms
177
 
178
+ = MailChimp Forms 1.0.5 =
179
  * More MailChimp features
180
 
181
+ = MailChimp Forms 1.0.1 =
182
  * The first version of MailChimp Forms WordPress plugin by MailMunch