@@ -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'](); |
@@ -45,8 +45,9 @@ |
||
| 45 | 45 | // before and after widget arguments are defined by themes |
| 46 | 46 | echo $args['before_widget']; |
| 47 | 47 | |
| 48 | - if ( ! empty( $title ) ) |
|
| 49 | - echo $args['before_title'] . $title . $args['after_title']; |
|
| 48 | + if ( ! empty( $title ) ) { |
|
| 49 | + echo $args['before_title'] . $title . $args['after_title']; |
|
| 50 | + } |
|
| 50 | 51 | |
| 51 | 52 | // Custom action hooks to place content in the widget before the form |
| 52 | 53 | // See FAQ for examples on usage |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if( isset( $_REQUEST['list-id'] ) ) { |
|
| 2 | + if( isset( $_REQUEST['list-id'] ) ) { |
|
| 3 | 3 | $list_id = sanitize_key( $_REQUEST['list-id'] ); |
| 4 | 4 | $api_key = trim( get_option( 'yikes-mc-api-key' , '' ) ); |
| 5 | 5 | $dash_position = strpos( $api_key, '-' ); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | 'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ), |
| 16 | 16 | ) ); |
| 17 | 17 | $list_data = json_decode( wp_remote_retrieve_body( $list_data ), true ); |
| 18 | - if( isset( $list_data['error'] ) ) { |
|
| 18 | + if( isset( $list_data['error'] ) ) { |
|
| 19 | 19 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
| 20 | 20 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
| 21 | 21 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | 'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ), |
| 38 | 38 | ) ); |
| 39 | 39 | $merge_variables = json_decode( wp_remote_retrieve_body( $merge_variables ), true ); |
| 40 | - if( isset( $merge_variables['error'] ) ) { |
|
| 40 | + if( isset( $merge_variables['error'] ) ) { |
|
| 41 | 41 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
| 42 | 42 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
| 43 | 43 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | ) ); |
| 63 | 63 | $interest_groupings = json_decode( wp_remote_retrieve_body( $interest_groupings ), true ); |
| 64 | 64 | |
| 65 | - if( isset( $interest_groupings['error'] ) ) { |
|
| 65 | + if( isset( $interest_groupings['error'] ) ) { |
|
| 66 | 66 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
| 67 | 67 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
| 68 | 68 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $icon = '<span class="dashicons dashicons-arrow-up"></span>'; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - if( !isset( $_REQUEST['sort'] ) ) { |
|
| 108 | + if( !isset( $_REQUEST['sort'] ) ) { |
|
| 109 | 109 | $icon = ''; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | 'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ), |
| 129 | 129 | ) ); |
| 130 | 130 | $subscribers_list = json_decode( wp_remote_retrieve_body( $subscribers_list ), true ); |
| 131 | - if( isset( $subscribers_list['error'] ) ) { |
|
| 131 | + if( isset( $subscribers_list['error'] ) ) { |
|
| 132 | 132 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
| 133 | 133 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
| 134 | 134 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | <tbody> |
| 218 | 218 | <?php if( $subscribers_list['total'] > 0 ) { |
| 219 | 219 | $i = 1; |
| 220 | - foreach( $subscribers_list['data'] as $subscriber ) { |
|
| 220 | + foreach( $subscribers_list['data'] as $subscriber ) { |
|
| 221 | 221 | $user_id = $subscriber['leid']; |
| 222 | 222 | // setup the email client name and icon |
| 223 | 223 | if( !empty( $subscriber['clients'] ) ) { |
@@ -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 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $form_results = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms WHERE id = ' . $form . '', ARRAY_A ); |
| 42 | 42 | // confirm we have some results, or return an error |
| 43 | 43 | if( ! $form_results ) { |
| 44 | - if( WP_DEBUG ) { |
|
| 44 | + if( WP_DEBUG ) { |
|
| 45 | 45 | return __( "Oh no...This form doesn't exist. Head back to the manage forms page and select a different form." , 'yikes-inc-easy-mailchimp-extender' ); |
| 46 | 46 | } |
| 47 | 47 | return; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | ) ); |
| 77 | 77 | |
| 78 | 78 | $subscriber_count_response = json_decode( wp_remote_retrieve_body( $subscriber_count_response ), true ); |
| 79 | - if( isset( $subscriber_count_response['error'] ) ) { |
|
| 79 | + if( isset( $subscriber_count_response['error'] ) ) { |
|
| 80 | 80 | if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
| 81 | 81 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
| 82 | 82 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -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 |
@@ -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 |