@@ -96,9 +96,11 @@ |
||
96 | 96 | $value = date( 'Y-m-d', strtotime( $value ) ); |
97 | 97 | } |
98 | 98 | } |
99 | - if( is_numeric( $merge_tag ) ) { // this is is an interest group! |
|
99 | + if( is_numeric( $merge_tag ) ) { |
|
100 | +// this is is an interest group! |
|
100 | 101 | $merge_variables['groupings'][] = array( 'id' => $merge_tag , 'groups' => ( is_array( $value ) ) ? $value : array( $value ) ); |
101 | - } else { // or else it's just a standard merge variable |
|
102 | + } else { |
|
103 | +// or else it's just a standard merge variable |
|
102 | 104 | $merge_variables[$merge_tag] = $value; |
103 | 105 | } |
104 | 106 | } |
@@ -92,9 +92,11 @@ |
||
92 | 92 | $value = ( '' != $value ) ? date( 'Y-m-d', strtotime( $value ) ) : ''; |
93 | 93 | } |
94 | 94 | } |
95 | - if( is_numeric( $merge_tag ) ) { // this is is an interest group! |
|
95 | + if( is_numeric( $merge_tag ) ) { |
|
96 | +// this is is an interest group! |
|
96 | 97 | $merge_variables['groupings'][] = array( 'id' => $merge_tag , 'groups' => ( is_array( $value ) ) ? $value : array( $value ) ); |
97 | - } else { // or else it's just a standard merge variable |
|
98 | + } else { |
|
99 | +// or else it's just a standard merge variable |
|
98 | 100 | $merge_variables[$merge_tag] = $value; |
99 | 101 | } |
100 | 102 | } |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | - class YIKES_Inc_Easy_MailChimp_Public_Ajax |
|
3 | - { |
|
2 | + class YIKES_Inc_Easy_MailChimp_Public_Ajax { |
|
4 | 3 | |
5 | 4 | /** |
6 | 5 | * Thetext domain of this plugin |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | protected $type = 'integration'; |
14 | 14 | private $text_domain = 'yikes-inc-easy-mailchimp-extender'; |
15 | 15 | |
16 | - public function __construct() { |
|
16 | + public function __construct() { |
|
17 | 17 | |
18 | 18 | } |
19 | 19 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | 'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ) |
46 | 46 | ) ); |
47 | 47 | $already_subscribed = json_decode( wp_remote_retrieve_body( $already_subscribed ), true ); |
48 | - if( isset( $already_subscribed['error'] ) ) { |
|
48 | + if( isset( $already_subscribed['error'] ) ) { |
|
49 | 49 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
50 | 50 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
51 | 51 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ) |
89 | 89 | ) ); |
90 | 90 | $already_subscribed = json_decode( wp_remote_retrieve_body( $already_subscribed ), true ); |
91 | - if( isset( $already_subscribed['error'] ) ) { |
|
91 | + if( isset( $already_subscribed['error'] ) ) { |
|
92 | 92 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
93 | 93 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
94 | 94 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * |
137 | 137 | * @since 6.0.0 |
138 | 138 | **/ |
139 | - public function subscribe_user_integration( $email, $type, $merge_vars ) { |
|
139 | + public function subscribe_user_integration( $email, $type, $merge_vars ) { |
|
140 | 140 | // get checkbox data |
141 | 141 | $checkbox_options = get_option( 'optin-checkbox-init' , '' ); |
142 | 142 | if( $type != 'registration_form' ) { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | ) ); |
187 | 187 | if( ! Is_wp_error( $subscribe_response ) ) { |
188 | 188 | $response_body = json_decode( wp_remote_retrieve_body( $subscribe_response ), true ); |
189 | - if( WP_DEBUG || isset( $response_body['error'] ) ) { |
|
189 | + if( WP_DEBUG || isset( $response_body['error'] ) ) { |
|
190 | 190 | if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
191 | 191 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
192 | 192 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | public function yikes_reg_complete_msg( $errors, $redirect_to ) { |
248 | 248 | if( isset( $errors->errors['registered'] ) ) { |
249 | 249 | $email_error = get_option( 'yikes_register_subscription_error' , '' ); |
250 | - if( isset( $email_error ) && $email_error != '' ) { |
|
250 | + if( isset( $email_error ) && $email_error != '' ) { |
|
251 | 251 | // Use the magic __get method to retrieve the errors array: |
252 | 252 | $tmp = $errors->errors; |
253 | 253 | $old = 'Registration complete. Please check your e-mail.'; |
@@ -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 | add_action( 'comment_form_field_comment', array( $this, 'output_checkbox' ), 10 ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @since 6.0.0 |
43 | 43 | **/ |
44 | - public function subscribe_from_comment( $comment_id , $comment_approved ) { |
|
44 | + public function subscribe_from_comment( $comment_id , $comment_approved ) { |
|
45 | 45 | // was sign-up checkbox checked? |
46 | 46 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |
47 | 47 | return false; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | // load our mail integrations class |
102 | 102 | require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations.php'; |
103 | 103 | // loop over selected classes and load them up! |
104 | - foreach( $integrations as $integration => $value ) { |
|
104 | + foreach( $integrations as $integration => $value ) { |
|
105 | 105 | if( isset( $value['value'] ) && $value['value'] == 'on' ) { |
106 | 106 | // load our class extensions |
107 | 107 | require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.'.$integration.'-checkbox.php'; |
@@ -136,7 +136,8 @@ discard block |
||
136 | 136 | if( $form_id ) { |
137 | 137 | $form_settings = self::yikes_retrieve_form_settings( $form_id ); |
138 | 138 | if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) { |
139 | - if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted |
|
139 | + if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { |
|
140 | +// ensure we only process the form that was submitted |
|
140 | 141 | // lets include our form processing file |
141 | 142 | include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' ); |
142 | 143 | if( $form_settings['submission_settings']['redirect_on_submission'] == '1' ) { |
@@ -39,9 +39,9 @@ |
||
39 | 39 | foreach ($results as $row) { |
40 | 40 | |
41 | 41 | // Add table headers |
42 | - if($first){ |
|
42 | + if($first) { |
|
43 | 43 | $titles = array(); |
44 | - foreach($row as $key=>$val){ |
|
44 | + foreach($row as $key=>$val) { |
|
45 | 45 | $titles[] = $key; |
46 | 46 | } |
47 | 47 | fputcsv($output_handle, $titles); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | while (($line = fgetcsv($file, 10000, ',')) !== FALSE) { |
24 | 24 | if( count( $line ) > 1 ) { |
25 | 25 | // Check if this is a settings import by confirming the first option is 'yikes-mc-api-key' |
26 | - if( $line[0] == 'yikes-mc-api-key' ) { |
|
26 | + if( $line[0] == 'yikes-mc-api-key' ) { |
|
27 | 27 | $options = fgetcsv($file, 10000, ','); |
28 | 28 | $new_settings = array(); |
29 | 29 | $x = 0; |
@@ -36,7 +36,8 @@ discard block |
||
36 | 36 | foreach( $new_settings as $option_name => $option_value ) { |
37 | 37 | update_option( $option_name, $option_value ); |
38 | 38 | } |
39 | - } else { // if it's not, then it's an opt-in forms import |
|
39 | + } else { |
|
40 | +// if it's not, then it's an opt-in forms import |
|
40 | 41 | global $wpdb; |
41 | 42 | if( $row != 1 ) { |
42 | 43 | $wpdb->insert( |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | * |
101 | 101 | * @since 5.6 |
102 | 102 | */ |
103 | - public function yikes_easy_mailchimp_generate_error_log_table() { |
|
103 | + public function yikes_easy_mailchimp_generate_error_log_table() { |
|
104 | 104 | // ensure file_get_contents exists |
105 | - if( function_exists( 'file_get_contents' ) ) { |
|
105 | + if( function_exists( 'file_get_contents' ) ) { |
|
106 | 106 | // confirm that our file exists |
107 | 107 | if( file_exists( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' ) ) { |
108 | 108 | $error_log_contents = file_get_contents( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' , true ); |
@@ -154,7 +154,8 @@ discard block |
||
154 | 154 | </tr> |
155 | 155 | <?php |
156 | 156 | } |
157 | - } else { // if file_get_contents is disabled server side |
|
157 | + } else { |
|
158 | +// if file_get_contents is disabled server side |
|
158 | 159 | ?> |
159 | 160 | <!-- table body --> |
160 | 161 | <tr> |