Easy Forms for MailChimp - Version 6.3.6

Version Description

Download this release

Release Info

Developer yikesitskevin
Plugin Icon 128x128 Easy Forms for MailChimp
Version 6.3.6
Comparing to
See all releases

Code changes from version 6.3.5 to 6.3.6

admin/class-yikes-inc-easy-mailchimp-extender-admin.php CHANGED
@@ -1616,10 +1616,24 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
1616
  <?php _e( "Select A Page or Post" , 'yikes-inc-easy-mailchimp-extender' ); ?>
1617
  <select id="redirect-user-to-selection" name="redirect-user-to-selection" onchange="shouldWeDisplayCustomURL( this );return;">
1618
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
1619
  // loop over registered post types, and query!
1620
  foreach( $post_types as $registered_post_type ) {
 
1621
  // exclude a few built in custom post types
1622
- if( ! in_array( $registered_post_type , array( 'attachment' , 'revision' , 'nav_menu_item' ) ) ) {
 
1623
  // run our query, to retreive the posts
1624
  $pages = get_posts( array(
1625
  'order' => 'ASC',
@@ -1628,6 +1642,7 @@ class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
1628
  'post_status' => 'publish',
1629
  'numberposts' => -1
1630
  ) );
 
1631
  // only show cpt's that have posts assigned
1632
  if( !empty( $pages ) ) {
1633
  ?>
1616
  <?php _e( "Select A Page or Post" , 'yikes-inc-easy-mailchimp-extender' ); ?>
1617
  <select id="redirect-user-to-selection" name="redirect-user-to-selection" onchange="shouldWeDisplayCustomURL( this );return;">
1618
  <?php
1619
+
1620
+ /**
1621
+ * yikes-mailchimp-excluded-redirect-post-types
1622
+ *
1623
+ * Filter the post types that will not show on the redirect list dropdown.
1624
+ *
1625
+ * @param array | $excluded_post_types | The array of default excluded post types
1626
+ * @return array| $excluded_post_types | The array of user-defined excluded post types
1627
+ */
1628
+ $excluded_post_types = array( 'attachment' , 'revision' , 'nav_menu_item', 'shop_order', 'shop_order_refund', 'custom_css', 'customize_changeset' );
1629
+ $excluded_post_types = apply_filters( 'yikes-mailchimp-excluded-redirect-post-types', $excluded_post_types );
1630
+
1631
  // loop over registered post types, and query!
1632
  foreach( $post_types as $registered_post_type ) {
1633
+
1634
  // exclude a few built in custom post types
1635
+ if( ! in_array( $registered_post_type, $excluded_post_types ) ) {
1636
+
1637
  // run our query, to retreive the posts
1638
  $pages = get_posts( array(
1639
  'order' => 'ASC',
1642
  'post_status' => 'publish',
1643
  'numberposts' => -1
1644
  ) );
1645
+
1646
  // only show cpt's that have posts assigned
1647
  if( !empty( $pages ) ) {
1648
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://yikesplugins.com/?utm_source=wp_plugin_repo&utm_medium=dona
4
  Tags: MailChimp, MailChimp forms, MailChimp lists, opt-in forms, sign up form, MailChimp, email, forms, mailing lists, marketing, newsletter, sign up
5
  Requires at least: 4.0
6
  Tested up to: 4.7.2
7
- Stable tag: 6.3.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -224,6 +224,8 @@ Below you'll find a complete list of the hooks and filters available in Easy For
224
  * `yikesinc_eme_api_args` - Filter the arguments used for a request to the MailChimp API. @params: $args, $path, $method, $params
225
  * Version 6.3.5:
226
  * `yikes-mailchimp-default-zip-code` - Filter to set the default zip code value. Default: `''` - @params $default_zip_code_value, $form_id
 
 
227
 
228
  **Actions**
229
 
@@ -245,6 +247,10 @@ Below you'll find a complete list of the hooks and filters available in Easy For
245
 
246
  == Changelog ==
247
 
 
 
 
 
248
  = Easy Forms for MailChimp 6.3.5 - February 13th, 2017 =
249
  * Added Canadian provinces to the state dropdown list. If you choose "Canada" as your country, you will see only the provinces. If you choose U.S. you will see only the states. For all other countries, the dropdown will fade out.
250
  * Added the filter: `yikes-mailchimp-default-zip-code` for defaulting the zip code
4
  Tags: MailChimp, MailChimp forms, MailChimp lists, opt-in forms, sign up form, MailChimp, email, forms, mailing lists, marketing, newsletter, sign up
5
  Requires at least: 4.0
6
  Tested up to: 4.7.2
7
+ Stable tag: 6.3.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
224
  * `yikesinc_eme_api_args` - Filter the arguments used for a request to the MailChimp API. @params: $args, $path, $method, $params
225
  * Version 6.3.5:
226
  * `yikes-mailchimp-default-zip-code` - Filter to set the default zip code value. Default: `''` - @params $default_zip_code_value, $form_id
227
+ * Version 6.3.6:
228
+ * `yikes-mailchimp-excluded-redirect-post-types` - Filter which post types will *not* be included in the dropdown of pages that you can redirect to. Some post types will never need to be redirected to, and for convenience (e.g. a smaller and easier to navigate dropdown) these can be added to the excluded post types array. Default: `array( 'attachment' , 'revision' , 'nav_menu_item', 'shop_order', 'shop_order_refund', 'custom_css', 'customize_changeset' );` - @params: $excluded_post_types (the default array)
229
 
230
  **Actions**
231
 
247
 
248
  == Changelog ==
249
 
250
+ = Easy Forms for MailChimp 6.3.6 - February 27th, 2017 =
251
+ * Removing the following post types from our dropdown of potential redirect pages: `custom_css`, `customize_changeset`, and WooCommerce's `shop_order` and `shop_order_refund`.
252
+ * Adding a filter (`yikes-mailchimp-excluded-redirect-post-types`) to allow users to define which CPTs will be excluded from the list of potential redirect pages. See the "Other Notes" section for the default list of excluded post types.
253
+
254
  = Easy Forms for MailChimp 6.3.5 - February 13th, 2017 =
255
  * Added Canadian provinces to the state dropdown list. If you choose "Canada" as your country, you will see only the provinces. If you choose U.S. you will see only the states. For all other countries, the dropdown will fade out.
256
  * Added the filter: `yikes-mailchimp-default-zip-code` for defaulting the zip code
yikes-inc-easy-mailchimp-extender.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Easy Forms for MailChimp
4
  * Plugin URI: https://yikesplugins.com/plugin/easy-forms-for-mailchimp/
5
  * Description: The ultimate MailChimp WordPress plugin. Easily build <strong>unlimited forms for your MailChimp lists</strong>, add them to your site and track subscriber activity. To get started, go to the settings page and enter your <a href="https://yikesplugins.com/support/knowledge-base/finding-your-mailchimp-api-key/" target="_blank">MailChimp API key</a>.
6
- * Version: 6.3.5
7
  * Author: YIKES, Inc.
8
  * Author URI: https://www.yikesplugins.com/
9
  * License: GPL-3.0+
@@ -42,7 +42,7 @@ if ( ! defined( 'WPINC' ) ) {
42
  * @since 6.1.3
43
  */
44
  if ( ! defined( 'YIKES_MC_VERSION' ) ) {
45
- define( 'YIKES_MC_VERSION' , '6.3.5' );
46
  }
47
 
48
  /**
3
  * Plugin Name: Easy Forms for MailChimp
4
  * Plugin URI: https://yikesplugins.com/plugin/easy-forms-for-mailchimp/
5
  * Description: The ultimate MailChimp WordPress plugin. Easily build <strong>unlimited forms for your MailChimp lists</strong>, add them to your site and track subscriber activity. To get started, go to the settings page and enter your <a href="https://yikesplugins.com/support/knowledge-base/finding-your-mailchimp-api-key/" target="_blank">MailChimp API key</a>.
6
+ * Version: 6.3.6
7
  * Author: YIKES, Inc.
8
  * Author URI: https://www.yikesplugins.com/
9
  * License: GPL-3.0+
42
  * @since 6.1.3
43
  */
44
  if ( ! defined( 'YIKES_MC_VERSION' ) ) {
45
+ define( 'YIKES_MC_VERSION' , '6.3.6' );
46
  }
47
 
48
  /**