@@ -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; |
@@ -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> |
@@ -45,7 +45,8 @@ |
||
| 45 | 45 | return; |
| 46 | 46 | } |
| 47 | 47 | self::_activate_yikes_easy_mailchimp( $wpdb ); |
| 48 | - } else { /* end network activate */ |
|
| 48 | + } else { |
|
| 49 | +/* end network activate */ |
|
| 49 | 50 | self::_activate_yikes_easy_mailchimp( $wpdb ); |
| 50 | 51 | } |
| 51 | 52 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | global $wpdb; |
| 96 | 96 | $list_data = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A ); |
| 97 | 97 | $lists = array(); |
| 98 | - if( !empty( $list_data ) ) { |
|
| 98 | + if( !empty( $list_data ) ) { |
|
| 99 | 99 | // build an array to pass to our javascript |
| 100 | 100 | foreach( $list_data as $form ) { |
| 101 | 101 | $lists[$form['form_name']] = $form['id']; |
@@ -2,8 +2,7 @@ discard block |
||
| 2 | 2 | /* |
| 3 | 3 | * Our ajax is processed inside of class.ajax.php |
| 4 | 4 | */ |
| 5 | - class YIKES_Inc_Easy_MailChimp_Dashboard_Widgets |
|
| 6 | - { |
|
| 5 | + class YIKES_Inc_Easy_MailChimp_Dashboard_Widgets { |
|
| 7 | 6 | |
| 8 | 7 | // Construction |
| 9 | 8 | public function __construct() { |
@@ -16,7 +15,8 @@ discard block |
||
| 16 | 15 | |
| 17 | 16 | // enqueue our JS file on the main dashboard page |
| 18 | 17 | function enqueue_dashboard_widget_script( $hook ) { |
| 19 | - if( 'index.php' == $hook ) { // default 'dashboard' page |
|
| 18 | + if( 'index.php' == $hook ) { |
|
| 19 | +// default 'dashboard' page |
|
| 20 | 20 | wp_register_script( 'yikes-easy-mc-dashboard-widget-script' , YIKES_MC_URL . 'admin/js/min/yikes-inc-easy-mailchimp-dashboard-widget.min.js' , array( 'jquery' ) , 'all' , false ); |
| 21 | 21 | $data_array = array( |
| 22 | 22 | 'ajax_url' => esc_url_raw( admin_url( 'admin-ajax.php' ) ), |
@@ -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']; ?>"> |
@@ -138,7 +138,8 @@ |
||
| 138 | 138 | if( $form_id ) { |
| 139 | 139 | $form_settings = self::yikes_retrieve_form_settings( $form_id ); |
| 140 | 140 | if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) { |
| 141 | - if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted |
|
| 141 | + if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { |
|
| 142 | +// ensure we only process the form that was submitted |
|
| 142 | 143 | // lets include our form processing file |
| 143 | 144 | include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' ); |
| 144 | 145 | if( $form_settings['submission_settings']['redirect_on_submission'] == '1' ) { |