@@ -17,7 +17,7 @@ |
||
| 17 | 17 | // required..* |
| 18 | 18 | include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
| 19 | 19 | /* Visual Composer */ |
| 20 | - if( is_plugin_active( 'js_composer/js_composer.php' ) ) { |
|
| 20 | + if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { |
|
| 21 | 21 | new YIKES_MailChimp_Visual_Composer_Extension(); |
| 22 | 22 | } |
| 23 | 23 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
| 9 | 9 | // users can only unisntall a plugin from the network dashboard page |
| 10 | 10 | // Get all blog ids |
| 11 | - $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); |
|
| 11 | + $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); |
|
| 12 | 12 | foreach ( $blogids as $blog_id ) { |
| 13 | 13 | switch_to_blog( $blog_id ); |
| 14 | 14 | self::_uninstall_yikes_easy_mailchimp( $wpdb ); |
@@ -28,15 +28,15 @@ discard block |
||
| 28 | 28 | * @since 6.0.0 |
| 29 | 29 | */ |
| 30 | 30 | static function _uninstall_yikes_easy_mailchimp( $wpdb ) { |
| 31 | - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
| 31 | + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
| 32 | 32 | |
| 33 | 33 | /* Clean up and delete our custom table from the databse */ |
| 34 | - $table = $wpdb->prefix."yikes_easy_mc_forms"; |
|
| 34 | + $table = $wpdb->prefix . "yikes_easy_mc_forms"; |
|
| 35 | 35 | $sql = 'DROP TABLE IF EXISTS ' . $table; |
| 36 | 36 | |
| 37 | 37 | //Delete any options thats stored also? |
| 38 | 38 | $wpdb->query( $sql ); |
| 39 | - dbDelta($sql); |
|
| 39 | + dbDelta( $sql ); |
|
| 40 | 40 | |
| 41 | 41 | /* Clear All Transient Data */ |
| 42 | 42 | delete_transient( 'yikes-easy-mailchimp-list-data' ); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
| 34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
| 35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 36 | 36 | <span class="dashicons dashicons-external"></span></a> |
| 37 | 37 | </div> |
| 38 | 38 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
| 34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
| 35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 36 | 36 | <span class="dashicons dashicons-external"></span></a> |
| 37 | 37 | </div> |
| 38 | 38 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
| 34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
| 35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 36 | 36 | <span class="dashicons dashicons-external"></span></a> |
| 37 | 37 | </div> |
| 38 | 38 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
| 34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
| 35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
| 36 | 36 | <span class="dashicons dashicons-external"></span></a> |
| 37 | 37 | </div> |
| 38 | 38 | |
@@ -3,18 +3,18 @@ |
||
| 3 | 3 | - Clear MailChimp transient data such as forms, form fields, list data, subscribers etc. |
| 4 | 4 | * transient cache is stored for 60 minutes. |
| 5 | 5 | --> |
| 6 | -<h3><span><?php _e( 'API Cache Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3> |
|
| 6 | +<h3><span><?php _e( 'API Cache Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3> |
|
| 7 | 7 | <div class="inside"> |
| 8 | 8 | |
| 9 | 9 | <!-- Settings Form --> |
| 10 | - <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data' , 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post"> |
|
| 10 | + <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post"> |
|
| 11 | 11 | |
| 12 | - <p><?php _e( "Delete all MailChimp data stored in your sites cache. Most data is stored in the cache for 1 hour." , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
| 12 | + <p><?php _e( "Delete all MailChimp data stored in your sites cache. Most data is stored in the cache for 1 hour.", 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
| 13 | 13 | <!-- check if any of our transients contain data --> |
| 14 | 14 | <?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?> |
| 15 | - <p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p> |
|
| 15 | + <p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p> |
|
| 16 | 16 | <?php } else { ?> |
| 17 | - <p><input type="submit" class="button-primary" value="<?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p> |
|
| 17 | + <p><input type="submit" class="button-primary" value="<?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p> |
|
| 18 | 18 | <?php } ?> |
| 19 | 19 | |
| 20 | 20 | </form> |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | $yikes_mc_api_constant = ( defined( 'YIKES_MC_API_KEY' ) ) ? true : false; |
| 9 | 9 | ?> |
| 10 | 10 | |
| 11 | -<h3><span><?php _e( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3> |
|
| 11 | +<h3><span><?php _e( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3> |
|
| 12 | 12 | <div class="inside"> |
| 13 | 13 | |
| 14 | 14 | <!-- Settings Form --> |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | <!-- MailChimp API Input Field --> |
| 22 | 22 | <label for="yks-mailchimp-api-key"> |
| 23 | 23 | |
| 24 | - <p><?php _e( 'Enter your API key in the field below to connect your site to your MailChimp account.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
| 24 | + <p><?php _e( 'Enter your API key in the field below to connect your site to your MailChimp account.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
| 25 | 25 | |
| 26 | - <p><strong><?php _e( 'MailChimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
| 26 | + <p><strong><?php _e( 'MailChimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
| 27 | 27 | |
| 28 | - <input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'MailChimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" /> |
|
| 28 | + <input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if ( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'MailChimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" /> |
|
| 29 | 29 | |
| 30 | 30 | <?php if ( $yikes_mc_api_constant ) { ?> |
| 31 | 31 | <p class="description"><?php printf( __( "Your MailChimp API key has been defined using the %s constant, in a PHP file.", "yikes-inc-easy-mailchimp-extender" ), '<code>YIKES_MC_API_KEY</code>' ); ?></p> |
@@ -34,19 +34,19 @@ discard block |
||
| 34 | 34 | <?php echo $api_error_response; ?> |
| 35 | 35 | |
| 36 | 36 | <?php if ( ! $yikes_mc_api_constant ) { ?> |
| 37 | - <p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p> |
|
| 37 | + <p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p> |
|
| 38 | 38 | <?php } ?> |
| 39 | 39 | </label> |
| 40 | 40 | |
| 41 | 41 | <!-- Use Nonce Validation Field --> |
| 42 | - <p><strong><?php _e( 'Enable nonce validation on this site?' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
| 42 | + <p><strong><?php _e( 'Enable nonce validation on this site?', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
| 43 | 43 | <label for="yikes-mailchimp-use-nonce-yes"> |
| 44 | 44 | Yes |
| 45 | - <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '1' ); ?> /> |
|
| 45 | + <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ), '1' ); ?> /> |
|
| 46 | 46 | </label> |
| 47 | 47 | <label for="yikes-mailchimp-use-nonce-no"> |
| 48 | 48 | No |
| 49 | - <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '0' ); ?> /> |
|
| 49 | + <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ), '0' ); ?> /> |
|
| 50 | 50 | </label> |
| 51 | 51 | |
| 52 | 52 | <?php submit_button(); ?> |
@@ -24,17 +24,17 @@ discard block |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * Allows us to apply_filters for the filters we're adding |
|
| 28 | - */ |
|
| 27 | + * Allows us to apply_filters for the filters we're adding |
|
| 28 | + */ |
|
| 29 | 29 | public function init_filters() { |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | - * yikes-mailchimp-wp-comment-integration-placement |
|
| 33 | - * |
|
| 34 | - * Decide the placement of the subscription checkbox. Default is after the "Comment" box. |
|
| 35 | - * |
|
| 36 | - * @return string | The name of a WP comment field's filter |
|
| 37 | - */ |
|
| 32 | + * yikes-mailchimp-wp-comment-integration-placement |
|
| 33 | + * |
|
| 34 | + * Decide the placement of the subscription checkbox. Default is after the "Comment" box. |
|
| 35 | + * |
|
| 36 | + * @return string | The name of a WP comment field's filter |
|
| 37 | + */ |
|
| 38 | 38 | $checkbox_placement = apply_filters( 'yikes-mailchimp-wp-comment-integration-placement', 'comment_form_field_comment' ); |
| 39 | 39 | |
| 40 | 40 | add_action( $checkbox_placement, array( $this, 'output_checkbox' ), 10 ); |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * Outputs a checkbox, if user is not already subscribed |
|
| 46 | - */ |
|
| 45 | + * Outputs a checkbox, if user is not already subscribed |
|
| 46 | + */ |
|
| 47 | 47 | public function output_checkbox( $comment_field ) { |
| 48 | 48 | if ( $this->is_user_already_subscribed( $this->type ) ) { |
| 49 | 49 | return $comment_field; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * a new comment is submitted |
| 60 | 60 | * |
| 61 | 61 | * @since 6.0.0 |
| 62 | - **/ |
|
| 62 | + **/ |
|
| 63 | 63 | public function subscribe_from_comment( $comment_id, $comment_approved ) { |
| 64 | 64 | |
| 65 | 65 | // was sign-up checkbox checked? |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | // Prevent direct access to the file |
| 9 | - defined('ABSPATH') or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!" , 'yikes-inc-easy-mailchimp-extender' ) ); |
|
| 9 | + defined( 'ABSPATH' ) or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!", 'yikes-inc-easy-mailchimp-extender' ) ); |
|
| 10 | 10 | |
| 11 | 11 | class Yikes_Easy_MC_Comment_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class { |
| 12 | 12 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ); |
| 83 | 83 | |
| 84 | 84 | // Subscribe the user |
| 85 | - $this->subscribe_user_integration( sanitize_email( $comment_data->comment_author_email ) , $this->type , $merge_vars ); |
|
| 85 | + $this->subscribe_user_integration( sanitize_email( $comment_data->comment_author_email ), $this->type, $merge_vars ); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | // declare our integration type |
| 14 | 14 | protected $type = 'comment_form'; |
| 15 | 15 | |
| 16 | - public function __construct() { |
|
| 16 | + public function __construct() { |
|
| 17 | 17 | // hooks for outputting the checkbox |
| 18 | 18 | add_action( 'thesis_hook_after_comment_box', array( $this, 'output_checkbox' ), 10 ); |
| 19 | 19 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @since 6.0.0 |
| 62 | 62 | **/ |
| 63 | - public function subscribe_from_comment( $comment_id, $comment_approved ) { |
|
| 63 | + public function subscribe_from_comment( $comment_id, $comment_approved ) { |
|
| 64 | 64 | |
| 65 | 65 | // was sign-up checkbox checked? |
| 66 | 66 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |