diff --git a/README.md b/README.md index 58b531e..08f7c2e 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,7 @@ This section describes how to install the plugin and get started using it. 3. Navigate to **Settings** click **Mailchimp Setup**. 4. Enter your Mailchimp API Key and let the plugin verify it. 5. Select the list where you want to send new Mailchimp subscribers. -6. Optional: turn **MonkeyRewards** on or off. -7. Optional: Turn **Merge Fields** and **Groups** on or off. Navigate to **Appearance**, and click **Widgets**. Drag the Mailchimp Widget into one of your Widget Areas. +6. Optional: Turn **Merge Fields** and **Groups** on or off. Navigate to **Appearance**, and click **Widgets**. Drag the Mailchimp Widget into one of your Widget Areas. ![Selecting your Mailchimp list](https://github.com/mailchimp/wordpress/blob/develop/.wordpress-org/screenshot-2.jpg?raw=true) diff --git a/mailchimp.php b/mailchimp.php index bd93ae1..0b2b53c 100644 --- a/mailchimp.php +++ b/mailchimp.php @@ -34,7 +34,7 @@ */ // Version constant for easy CSS refreshes -define( 'MCSF_VER', '1.5.8' ); +define( 'MCSF_VER', '1.6.0' ); // What's our permission (capability) threshold define( 'MCSF_CAP_THRESHOLD', 'manage_options' ); @@ -54,6 +54,9 @@ // includes the backwards compatibility functions require_once 'mailchimp_compat.php'; +// Upgrade routines. +require_once 'mailchimp_upgrade.php'; + /** * Do the following plugin setup steps here * @@ -421,7 +424,6 @@ function mailchimp_sf_delete_setup() { 'mc_sopresto_user', 'mc_sopresto_public_key', 'mc_sopresto_secret_key', - 'mc_rewards', 'mc_use_javascript', 'mc_use_datepicker', 'mc_use_unsub_link', @@ -508,15 +510,6 @@ function mailchimp_sf_set_form_defaults( $list_name = '' ) { function mailchimp_sf_save_general_form_settings() { // IF NOT DEV MODE - if ( isset( $_POST['mc_rewards'] ) ) { - update_option( 'mc_rewards', 'on' ); - $msg = '
' . __( 'Monkey Rewards turned On!', 'mailchimp_i18n' ) . '
'; - mailchimp_sf_global_msg( $msg ); - } elseif ( get_option( 'mc_rewards' ) !== 'off' ) { - update_option( 'mc_rewards', 'off' ); - $msg = '' . __( 'Monkey Rewards turned Off!', 'mailchimp_i18n' ) . '
'; - mailchimp_sf_global_msg( $msg ); - } if ( isset( $_POST['mc_use_javascript'] ) ) { update_option( 'mc_use_javascript', 'on' ); $msg = '' . __( 'Fancy Javascript submission turned On!', 'mailchimp_i18n' ) . '
'; diff --git a/mailchimp_upgrade.php b/mailchimp_upgrade.php new file mode 100644 index 0000000..926a987 --- /dev/null +++ b/mailchimp_upgrade.php @@ -0,0 +1,38 @@ +' ) ) { + mailchimp_update_1_6_0(); + } + + update_option( 'mc_version', MCSF_VER ); +} + +add_action( 'plugins_loaded', 'mailchimp_version_check' ); + +/** + * Version 1.6.0 update routine + * - Remove MonkeyRewards checkbox option + * + * @return void + */ +function mailchimp_update_1_6_0() { + delete_option( 'mc_rewards' ); +} diff --git a/mailchimp_widget.php b/mailchimp_widget.php index f799df0..6e4e906 100644 --- a/mailchimp_widget.php +++ b/mailchimp_widget.php @@ -262,14 +262,6 @@ function mailchimp_sf_signup_form( $args = array() ) { -List Options | |
---|---|
? | -id="mc_rewards" class="code" /> - - | -