@@ -1214,8 +1214,6 @@ discard block |
||
| 1214 | 1214 | * the correct WordPress options API (old plugin stored options wierdly) |
| 1215 | 1215 | * |
| 1216 | 1216 | * @since 1.0.0 |
| 1217 | - * @param string $yikes_inc_easy_mailchimp_extender The name of this plugin. |
|
| 1218 | - * @param string $version The version of this plugin. |
|
| 1219 | 1217 | */ |
| 1220 | 1218 | public function check_for_old_yks_mc_options() { |
| 1221 | 1219 | $old_plugin_options = get_option( 'ykseme_storage' ); |
@@ -1250,8 +1248,6 @@ discard block |
||
| 1250 | 1248 | * the correct WordPress options API (old plugin stored options wierdly) |
| 1251 | 1249 | * |
| 1252 | 1250 | * @since 1.0.0 |
| 1253 | - * @param string $yikes_inc_easy_mailchimp_extender The name of this plugin. |
|
| 1254 | - * @param string $version The version of this plugin. |
|
| 1255 | 1251 | */ |
| 1256 | 1252 | public function display_options_migrate_notice() { |
| 1257 | 1253 | |
@@ -413,8 +413,9 @@ discard block |
||
| 413 | 413 | $create_ticket_response = wp_remote_retrieve_body( $response ); |
| 414 | 414 | |
| 415 | 415 | // display it |
| 416 | - if( $create_ticket_response ) |
|
| 417 | - echo $create_ticket_response; |
|
| 416 | + if( $create_ticket_response ) { |
|
| 417 | + echo $create_ticket_response; |
|
| 418 | + } |
|
| 418 | 419 | |
| 419 | 420 | } |
| 420 | 421 | |
@@ -1160,7 +1161,7 @@ discard block |
||
| 1160 | 1161 | if( isset( $body['msg'] ) && $body['msg'] == "Everything's Chimpy!" ) { |
| 1161 | 1162 | update_option( 'yikes-mc-api-validation' , 'valid_api_key' ); |
| 1162 | 1163 | } |
| 1163 | - } else { |
|
| 1164 | + } else { |
|
| 1164 | 1165 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
| 1165 | 1166 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
| 1166 | 1167 | $error_logging->yikes_easy_mailchimp_write_to_error_log( $api_key_response->get_error_message() , __( "Connecting to MailChimp" , 'yikes-inc-easy-mailchimp-extender' ) , __( "Settings Page/General Settings" , 'yikes-inc-easy-mailchimp-extender' ) ); |
@@ -2009,7 +2010,8 @@ discard block |
||
| 2009 | 2010 | |
| 2010 | 2011 | |
| 2011 | 2012 | |
| 2012 | - } else { // THIS IS AN INTEREST GROUP! |
|
| 2013 | + } else { |
|
| 2014 | +// THIS IS AN INTEREST GROUP! |
|
| 2013 | 2015 | |
| 2014 | 2016 | ?> |
| 2015 | 2017 | <section class="draggable" id="<?php echo $field['group_id']; ?>"> |
@@ -23,6 +23,10 @@ discard block |
||
| 23 | 23 | * @since 6.0.0 |
| 24 | 24 | * @$integration_type - pass in the type of checkbox integration |
| 25 | 25 | */ |
| 26 | + |
|
| 27 | + /** |
|
| 28 | + * @param string $integration_type |
|
| 29 | + */ |
|
| 26 | 30 | public function is_user_already_subscribed( $integration_type ) { |
| 27 | 31 | // first check if the user is logged in |
| 28 | 32 | if( is_user_logged_in() ) { |
@@ -69,6 +73,10 @@ discard block |
||
| 69 | 73 | * @$email - users email address entered into the form |
| 70 | 74 | * @$integration_type - pass in the type of checkbox integration |
| 71 | 75 | */ |
| 76 | + |
|
| 77 | + /** |
|
| 78 | + * @param string $integration_type |
|
| 79 | + */ |
|
| 72 | 80 | public function is_new_registration_already_subscribed( $email , $integration_type ) { |
| 73 | 81 | // first check if the user is logged in |
| 74 | 82 | $checkbox_options = get_option( 'optin-checkbox-init' , '' ); |
@@ -233,6 +241,10 @@ discard block |
||
| 233 | 241 | * before continuing |
| 234 | 242 | * @since 6.0.0 |
| 235 | 243 | */ |
| 244 | + |
|
| 245 | + /** |
|
| 246 | + * @param string $type |
|
| 247 | + */ |
|
| 236 | 248 | public function was_checkbox_checked( $type ) { |
| 237 | 249 | // was sign-up checkbox checked - return the value |
| 238 | 250 | return ( isset( $_POST[ 'yikes_mailchimp_checkbox_'.$type ] ) && $_POST[ 'yikes_mailchimp_checkbox_'.$type ] == 1 ); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * @param array $anonymous_data |
| 42 | 42 | * @param int $user_id |
| 43 | 43 | * @param string $trigger |
| 44 | - * @return boolean |
|
| 44 | + * @return boolean|null |
|
| 45 | 45 | */ |
| 46 | 46 | public function subscribe_from_bbpress( $anonymous_data, $user_id, $trigger ) { |
| 47 | 47 | $user_data = get_userdata( $user_id ); |
@@ -40,7 +40,6 @@ |
||
| 40 | 40 | * @param string $user_login |
| 41 | 41 | * @param string $user_password |
| 42 | 42 | * @param string $user_email |
| 43 | - * @param array $usermeta |
|
| 44 | 43 | */ |
| 45 | 44 | public function subscribe_from_buddypress_form( $user_id, $user_login, $user_password, $user_email ) { |
| 46 | 45 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |
@@ -41,7 +41,6 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * @param array $meta |
|
| 45 | 44 | * |
| 46 | 45 | * @return array |
| 47 | 46 | */ |
@@ -57,7 +56,7 @@ discard block |
||
| 57 | 56 | /** |
| 58 | 57 | * @param int $payment_id The ID of the payment |
| 59 | 58 | * |
| 60 | - * @return bool|string |
|
| 59 | + * @return false|null |
|
| 61 | 60 | */ |
| 62 | 61 | public function subscribe_from_edd_purchase( $payment_id ) { |
| 63 | 62 | $meta = get_post_meta( $payment_id , '_yikes_easy_mc_optin' , true ); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * |
| 36 | 36 | * @param int $user_id |
| 37 | 37 | * |
| 38 | - * @return bool|string |
|
| 38 | + * @return false|null |
|
| 39 | 39 | */ |
| 40 | 40 | public function subscribe_from_registration( $user_id ) { |
| 41 | 41 | // was sign-up checkbox checked? |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <?php |
| 24 | 24 | } |
| 25 | 25 | $main_field_data = $section_data['main_fields']; |
| 26 | - foreach( $main_field_data as $field ) { |
|
| 26 | + foreach( $main_field_data as $field ) { |
|
| 27 | 27 | if( $field['type'] == 'custom' ) { |
| 28 | 28 | // execute the custom callback |
| 29 | 29 | $field['callback'](); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <?php |
| 54 | 54 | } |
| 55 | 55 | $sidebar_field_data = $section_data['sidebar_fields']; |
| 56 | - foreach( $sidebar_field_data as $field ) { |
|
| 56 | + foreach( $sidebar_field_data as $field ) { |
|
| 57 | 57 | if( $field['type'] == 'custom' ) { |
| 58 | 58 | // execute the custom callback |
| 59 | 59 | $field['callback'](); |
@@ -112,9 +112,11 @@ |
||
| 112 | 112 | |
| 113 | 113 | // update 'date_format' on 'birthday' and 'date' fields |
| 114 | 114 | if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'date', 'birthday' ) ) ) { |
| 115 | - if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { // date |
|
| 115 | + if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { |
|
| 116 | +// date |
|
| 116 | 117 | $mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD'; // mailchimp default (can be altered) |
| 117 | - } else { // birthday |
|
| 118 | + } else { |
|
| 119 | +// birthday |
|
| 118 | 120 | $mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD/YYYY'; // mailchimp default (can be altered) |
| 119 | 121 | } |
| 120 | 122 | } |
@@ -943,7 +943,8 @@ |
||
| 943 | 943 | |
| 944 | 944 | } |
| 945 | 945 | |
| 946 | - } else { // loop over interest groups |
|
| 946 | + } else { |
|
| 947 | +// loop over interest groups |
|
| 947 | 948 | |
| 948 | 949 | |
| 949 | 950 | // store default choice |