@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | // Widget name will appear in UI |
26 | 26 | __( 'Easy Mailchimp Forms', 'yikes-inc-easy-mailchimp-extender' ), |
27 | 27 | // Widget description |
28 | - array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ), ) |
|
28 | + array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ),) |
|
29 | 29 | ); |
30 | 30 | } |
31 | 31 | |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | // Get all form IDs so we can use the first one as a default. |
40 | 40 | $form_ids = $this->form_interface->get_form_ids(); |
41 | 41 | |
42 | - $title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' ); |
|
43 | - $form_id = isset( $instance['form_id'] ) ? $instance['form_id'] : $form_ids[0]; |
|
44 | - $form_description = isset( $instance['form_description'] ) ? $instance['form_description'] : ''; |
|
45 | - $submit_button_text = isset( $instance['submit_text'] ) ? $instance['submit_text'] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); |
|
42 | + $title = isset( $instance[ 'title' ] ) ? apply_filters( 'widget_title', $instance[ 'title' ] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' ); |
|
43 | + $form_id = isset( $instance[ 'form_id' ] ) ? $instance[ 'form_id' ] : $form_ids[ 0 ]; |
|
44 | + $form_description = isset( $instance[ 'form_description' ] ) ? $instance[ 'form_description' ] : ''; |
|
45 | + $submit_button_text = isset( $instance[ 'submit_text' ] ) ? $instance[ 'submit_text' ] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); |
|
46 | 46 | |
47 | 47 | // Build our array based on settings chosen |
48 | 48 | $shortcode_attributes = array( |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | $shortcode_attributes = apply_filters( 'yikes_mailchimp_widget_shortcode_attributes', $shortcode_attributes, $instance ); |
55 | 55 | |
56 | 56 | // before and after widget arguments are defined by themes |
57 | - echo $args['before_widget']; |
|
57 | + echo $args[ 'before_widget' ]; |
|
58 | 58 | |
59 | 59 | if ( ! empty( $title ) ) { |
60 | - echo $args['before_title'] . $title . $args['after_title']; |
|
60 | + echo $args[ 'before_title' ] . $title . $args[ 'after_title' ]; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Custom action hooks to place content in the widget before the form |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | do_action( 'yikes-mailchimp-after-form-' . $form_id ); |
74 | 74 | do_action( 'yikes-mailchimp-after-form' ); |
75 | 75 | |
76 | - echo $args['after_widget']; |
|
76 | + echo $args[ 'after_widget' ]; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | // Widget Backend |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if ( empty( $all_forms ) ) { |
84 | 84 | ?> |
85 | 85 | <section class="no-forms-widget"> |
86 | - <strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form' , 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form' , 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong> |
|
86 | + <strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form', 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form', 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong> |
|
87 | 87 | </section> |
88 | 88 | <?php |
89 | 89 | return; |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | $submit_text = __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); |
111 | 111 | } |
112 | 112 | |
113 | - if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) { |
|
113 | + if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) { |
|
114 | 114 | ?> |
115 | - <p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
115 | + <p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
116 | 116 | <?php |
117 | 117 | return; |
118 | 118 | } |
@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | <select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat"> |
130 | 130 | <?php |
131 | 131 | // build our array |
132 | - foreach( $all_forms as $id => $form ) { |
|
132 | + foreach ( $all_forms as $id => $form ) { |
|
133 | 133 | ?> |
134 | - <option <?php selected( $selected_form , $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form['form_name'] ); ?></option> |
|
134 | + <option <?php selected( $selected_form, $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form[ 'form_name' ] ); ?></option> |
|
135 | 135 | <?php |
136 | 136 | } |
137 | 137 | ?> |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | <p> |
142 | 142 | <label for="<?php echo $this->get_field_id( 'form_description' ); ?>"><?php _e( 'Display Form Description:' ); ?></label> |
143 | - <input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if( isset( $instance['form_description'] ) ) { checked( $instance['form_description'] , 1 ); } ?> /> |
|
143 | + <input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if ( isset( $instance[ 'form_description' ] ) ) { checked( $instance[ 'form_description' ], 1 ); } ?> /> |
|
144 | 144 | </p> |
145 | 145 | |
146 | 146 | <p> |
@@ -153,10 +153,10 @@ discard block |
||
153 | 153 | // Updating widget replacing old instances with new |
154 | 154 | public function update( $new_instance, $old_instance ) { |
155 | 155 | $instance = array(); |
156 | - $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; |
|
157 | - $instance['form_id'] = $new_instance['form_id']; |
|
158 | - $instance['form_description'] = isset( $new_instance['form_description'] ) ? '1' : ''; |
|
159 | - $instance['submit_text'] = ( ! empty( $new_instance['submit_text'] ) ) ? strip_tags( $new_instance['submit_text'] ) : 'Submit'; |
|
156 | + $instance[ 'title' ] = ( ! empty( $new_instance[ 'title' ] ) ) ? strip_tags( $new_instance[ 'title' ] ) : ''; |
|
157 | + $instance[ 'form_id' ] = $new_instance[ 'form_id' ]; |
|
158 | + $instance[ 'form_description' ] = isset( $new_instance[ 'form_description' ] ) ? '1' : ''; |
|
159 | + $instance[ 'submit_text' ] = ( ! empty( $new_instance[ 'submit_text' ] ) ) ? strip_tags( $new_instance[ 'submit_text' ] ) : 'Submit'; |
|
160 | 160 | return $instance; |
161 | 161 | } |
162 | 162 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | if ( ! empty( $all_forms ) ) { |
116 | 116 | // build an array to pass to our javascript |
117 | 117 | foreach ( $all_forms as $id => $form ) { |
118 | - $lists[ $form['form_name'] ] = $id; |
|
118 | + $lists[ $form[ 'form_name' ] ] = $id; |
|
119 | 119 | } |
120 | 120 | } else { |
121 | 121 | $lists[ __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-'; |
@@ -5,18 +5,18 @@ discard block |
||
5 | 5 | * @since 6.0.3 |
6 | 6 | */ |
7 | 7 | |
8 | -class YIKES_Mailchimp_Visual_Composer_Extension { |
|
8 | +class YIKES_Mailchimp_Visual_Composer_Extension { |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Constructor |
12 | 12 | * |
13 | 13 | * @since 6.0.3 |
14 | 14 | */ |
15 | - function __construct() { |
|
15 | + function __construct() { |
|
16 | 16 | |
17 | 17 | add_action( 'admin_init', array( $this, 'extend_visual_composer' ) ); |
18 | 18 | |
19 | - if ( function_exists( 'vc_add_shortcode_param' ) ) { |
|
19 | + if ( function_exists( 'vc_add_shortcode_param' ) ) { |
|
20 | 20 | vc_add_shortcode_param( 'yikes_mailchimp_logo', array( $this, 'yikes_mailchimp_logo_vc_section' ) ); |
21 | 21 | } |
22 | 22 | } |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @since 6.0.3 |
28 | 28 | */ |
29 | - public function extend_visual_composer() { |
|
29 | + public function extend_visual_composer() { |
|
30 | 30 | |
31 | - if ( ! function_exists( 'vc_map' ) ) { |
|
31 | + if ( ! function_exists( 'vc_map' ) ) { |
|
32 | 32 | return; |
33 | 33 | } |
34 | 34 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @since 6.0.3 |
100 | 100 | */ |
101 | - public function yikes_mailchimp_logo_vc_section() { |
|
101 | + public function yikes_mailchimp_logo_vc_section() { |
|
102 | 102 | return '<img style="width:250px;display:block;margin:0 auto;" src="' . YIKES_MC_URL . 'includes/images/Mailchimp_Assets/mailchimp-logo.png" title="' . __( 'Easy Forms for Mailchimp', 'yikes-inc-easy-mailchimp-extender' ) . '" />'; |
103 | 103 | } |
104 | 104 | |
@@ -107,17 +107,17 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @since 6.0.3 |
109 | 109 | */ |
110 | - public function yikes_mailchimp_retreive_user_created_forms() { |
|
110 | + public function yikes_mailchimp_retreive_user_created_forms() { |
|
111 | 111 | $interface = yikes_easy_mailchimp_extender_get_form_interface(); |
112 | 112 | $all_forms = $interface->get_all_forms(); |
113 | 113 | |
114 | 114 | $lists = array(); |
115 | - if ( ! empty( $all_forms ) ) { |
|
115 | + if ( ! empty( $all_forms ) ) { |
|
116 | 116 | // build an array to pass to our javascript |
117 | - foreach ( $all_forms as $id => $form ) { |
|
117 | + foreach ( $all_forms as $id => $form ) { |
|
118 | 118 | $lists[ $form['form_name'] ] = $id; |
119 | 119 | } |
120 | - } else { |
|
120 | + } else { |
|
121 | 121 | $lists[ __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-'; |
122 | 122 | } |
123 | 123 |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | // If the API gave an error or there are no more lists, break. |
82 | - if ( isset( $response['error'] ) ) { |
|
83 | - return new WP_Error( $response['title'], $response['detail'] ); |
|
82 | + if ( isset( $response[ 'error' ] ) ) { |
|
83 | + return new WP_Error( $response[ 'title' ], $response[ 'detail' ] ); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | if ( empty( $response[ $item_key ] ) ) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | // Update the total number of items if it's still zero. |
91 | 91 | if ( 0 === $total ) { |
92 | - $total = intval( $response['total_items'] ); |
|
92 | + $total = intval( $response[ 'total_items' ] ); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | // Store each new list. |
@@ -196,16 +196,16 @@ discard block |
||
196 | 196 | return $response; |
197 | 197 | } |
198 | 198 | |
199 | - if ( isset( $response['error'] ) ) { |
|
200 | - $title = isset( $response['title'] ) ? $response['title'] : $response['name']; |
|
201 | - $detail = isset( $response['detail'] ) ? $response['detail'] : $response['error']; |
|
202 | - $data = isset( $response['errors'] ) ? $response['errors'] : array(); |
|
199 | + if ( isset( $response[ 'error' ] ) ) { |
|
200 | + $title = isset( $response[ 'title' ] ) ? $response[ 'title' ] : $response[ 'name' ]; |
|
201 | + $detail = isset( $response[ 'detail' ] ) ? $response[ 'detail' ] : $response[ 'error' ]; |
|
202 | + $data = isset( $response[ 'errors' ] ) ? $response[ 'errors' ] : array(); |
|
203 | 203 | |
204 | 204 | return new WP_Error( |
205 | 205 | $title, |
206 | 206 | $detail, |
207 | 207 | array( |
208 | - 'status' => (int) $response['status'], |
|
208 | + 'status' => (int) $response[ 'status' ], |
|
209 | 209 | 'data' => $data, |
210 | 210 | ) |
211 | 211 | ); |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | // Mailchimp uses the application/problem+json type for errors. |
236 | 236 | $headers = wp_remote_retrieve_headers( $response ); |
237 | 237 | |
238 | - if ( isset( $headers['content-type'] ) ) { |
|
239 | - if ( false !== strpos( $headers['content-type'], 'application/problem+json' ) ) { |
|
240 | - $body['error'] = true; |
|
238 | + if ( isset( $headers[ 'content-type' ] ) ) { |
|
239 | + if ( false !== strpos( $headers[ 'content-type' ], 'application/problem+json' ) ) { |
|
240 | + $body[ 'error' ] = true; |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @return array|WP_Error |
104 | 104 | */ |
105 | 105 | public function patch( $path = '', $headers = array(), $params = array() ) { |
106 | - if ( ! isset( $params['body'] ) ) { |
|
106 | + if ( ! isset( $params[ 'body' ] ) ) { |
|
107 | 107 | return new WP_Error( |
108 | 108 | 'yikesinc_eme_missing_body', |
109 | 109 | sprintf( |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * @return array|WP_Error |
131 | 131 | */ |
132 | 132 | public function post( $path = '', $headers = array(), $params = array() ) { |
133 | - if ( ! isset( $params['body'] ) ) { |
|
133 | + if ( ! isset( $params[ 'body' ] ) ) { |
|
134 | 134 | return new WP_Error( |
135 | 135 | 'yikesinc_eme_missing_body', |
136 | 136 | sprintf( |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @return array|WP_Error |
158 | 158 | */ |
159 | 159 | public function put( $path = '', $headers = array(), $params = array() ) { |
160 | - if ( ! isset( $params['body'] ) ) { |
|
160 | + if ( ! isset( $params[ 'body' ] ) ) { |
|
161 | 161 | return new WP_Error( |
162 | 162 | 'yikesinc_eme_missing_body', |
163 | 163 | sprintf( |
@@ -288,13 +288,13 @@ discard block |
||
288 | 288 | $authorized_args = $this->get_authorized_args(); |
289 | 289 | |
290 | 290 | // If we have body data, maybe convert it to JSON. |
291 | - if ( isset( $params['body'] ) && ( is_array( $params['body'] ) || is_object( $params['body'] ) ) ) { |
|
292 | - $params['body'] = json_encode( wp_parse_args( $authorized_args['body'], $params['body'] ) ); |
|
293 | - $headers['Content-Type'] = 'application/json'; |
|
291 | + if ( isset( $params[ 'body' ] ) && ( is_array( $params[ 'body' ] ) || is_object( $params[ 'body' ] ) ) ) { |
|
292 | + $params[ 'body' ] = json_encode( wp_parse_args( $authorized_args[ 'body' ], $params[ 'body' ] ) ); |
|
293 | + $headers[ 'Content-Type' ] = 'application/json'; |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | // Combine the given headers and auth headers |
297 | - $headers = wp_parse_args( $authorized_args['headers'], $headers ); |
|
297 | + $headers = wp_parse_args( $authorized_args[ 'headers' ], $headers ); |
|
298 | 298 | /** |
299 | 299 | * Filter the headers used for a request to the Mailchimp API. |
300 | 300 | * |
@@ -358,12 +358,12 @@ discard block |
||
358 | 358 | |
359 | 359 | // Version 2.0 uses body authorization |
360 | 360 | if ( version_compare( '3.0', $this->api_version, '>' ) ) { |
361 | - $args['body'] = $this->get_auth_body(); |
|
361 | + $args[ 'body' ] = $this->get_auth_body(); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | // Version 3.0 uses authorization headers. |
365 | 365 | if ( version_compare( '3.0', $this->api_version, '<=' ) ) { |
366 | - $args['headers'] = $this->get_auth_headers(); |
|
366 | + $args[ 'headers' ] = $this->get_auth_headers(); |
|
367 | 367 | } |
368 | 368 | |
369 | 369 | return $args; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | $yikes_mc_api_constant = defined( 'YIKES_MC_API_KEY' ); |
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,21 +34,21 @@ 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 | |
40 | 40 | <p class="description">Warning: changing your API key will break your current forms.</p> |
41 | 41 | </label> |
42 | 42 | |
43 | 43 | <!-- Use Nonce Validation Field --> |
44 | - <p><strong><?php _e( 'Enable nonce validation on this site?' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
44 | + <p><strong><?php _e( 'Enable nonce validation on this site?', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p> |
|
45 | 45 | <label for="yikes-mailchimp-use-nonce-yes"> |
46 | 46 | Yes |
47 | - <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' ); ?> /> |
|
47 | + <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' ); ?> /> |
|
48 | 48 | </label> |
49 | 49 | <label for="yikes-mailchimp-use-nonce-no"> |
50 | 50 | No |
51 | - <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' ); ?> /> |
|
51 | + <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' ); ?> /> |
|
52 | 52 | </label> |
53 | 53 | |
54 | 54 | <?php submit_button(); ?> |
@@ -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> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $data = $_POST; |
15 | 15 | |
16 | 16 | // Confirm we have a form id to work with |
17 | -$form_id = ( isset( $data['yikes-mailchimp-submitted-form'] ) ) ? absint( $data['yikes-mailchimp-submitted-form'] ) : false; |
|
17 | +$form_id = ( isset( $data[ 'yikes-mailchimp-submitted-form' ] ) ) ? absint( $data[ 'yikes-mailchimp-submitted-form' ] ) : false; |
|
18 | 18 | |
19 | 19 | // Set the form id in our class |
20 | 20 | $submission_handler->set_form_id( $form_id ); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | // Check our nonce |
31 | -if ( $submission_handler->handle_nonce( $_POST['yikes_easy_mc_new_subscriber'], 'yikes_easy_mc_form_submit' ) === false ) { |
|
31 | +if ( $submission_handler->handle_nonce( $_POST[ 'yikes_easy_mc_new_subscriber' ], 'yikes_easy_mc_form_submit' ) === false ) { |
|
32 | 32 | $process_submission_response = $submission_handler->wrap_form_submission_response( $submission_handler->handle_nonce_message, $is_success = false ); |
33 | 33 | return; |
34 | 34 | } |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | // Set up some variables from the form data -- these are required |
47 | -$list_id = isset( $form_data['list_id'] ) ? $form_data['list_id'] : null; |
|
48 | -$submission_settings = isset( $form_data['submission_settings'] ) ? $form_data['submission_settings'] : null; |
|
49 | -$optin_settings = isset( $form_data['optin_settings'] ) ? $form_data['optin_settings'] : null; |
|
50 | -$form_fields = isset( $form_data['fields'] ) ? $form_data['fields'] : null; |
|
47 | +$list_id = isset( $form_data[ 'list_id' ] ) ? $form_data[ 'list_id' ] : null; |
|
48 | +$submission_settings = isset( $form_data[ 'submission_settings' ] ) ? $form_data[ 'submission_settings' ] : null; |
|
49 | +$optin_settings = isset( $form_data[ 'optin_settings' ] ) ? $form_data[ 'optin_settings' ] : null; |
|
50 | +$form_fields = isset( $form_data[ 'fields' ] ) ? $form_data[ 'fields' ] : null; |
|
51 | 51 | |
52 | 52 | // Send an error if for some reason we can't find the required form data |
53 | 53 | if ( $submission_handler->handle_empty_fields_generic( array( $list_id, $submission_settings, $optin_settings, $form_fields ) ) === false ) { |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | $submission_handler->set_list_id( $list_id ); |
71 | 71 | |
72 | 72 | // Set up some variables from the form data -- these are not required |
73 | -$error_messages = isset( $form_data['error_messages'] ) ? $form_data['error_messages'] : array(); |
|
74 | -$notifications = isset( $form_data['custom_notifications'] ) ? $form_data['custom_notifications'] : array(); // Do we need this? |
|
73 | +$error_messages = isset( $form_data[ 'error_messages' ] ) ? $form_data[ 'error_messages' ] : array(); |
|
74 | +$notifications = isset( $form_data[ 'custom_notifications' ] ) ? $form_data[ 'custom_notifications' ] : array(); // Do we need this? |
|
75 | 75 | |
76 | 76 | // Set the error messages in our class |
77 | 77 | $submission_handler->set_error_messages( $error_messages ); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | // Get, sanitize, and lowercasify the email |
90 | -$submitted_email = isset( $data['EMAIL'] ) ? $data['EMAIL'] : ''; |
|
90 | +$submitted_email = isset( $data[ 'EMAIL' ] ) ? $data[ 'EMAIL' ] : ''; |
|
91 | 91 | $sanitized_email = $submission_handler->get_sanitized_email( $submitted_email ); |
92 | 92 | $submission_handler->set_email( $sanitized_email ); |
93 | 93 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | // Check for Honeypot filled |
101 | -$honey_pot_filled = ( isset( $data['yikes-mailchimp-honeypot'] ) && '' !== $data['yikes-mailchimp-honeypot'] ) ? true : false; |
|
101 | +$honey_pot_filled = ( isset( $data[ 'yikes-mailchimp-honeypot' ] ) && '' !== $data[ 'yikes-mailchimp-honeypot' ] ) ? true : false; |
|
102 | 102 | |
103 | 103 | // Send an error if honey pot is not empty |
104 | 104 | if ( $submission_handler->handle_non_empty_honeypot( $honey_pot_filled ) === false ) { |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | // Check if reCAPTCHA Response was submitted with the form data, and handle it if needed |
110 | -if ( isset( $data['g-recaptcha-response'] ) ) { |
|
111 | - $recaptcha_response = $data['g-recaptcha-response']; |
|
110 | +if ( isset( $data[ 'g-recaptcha-response' ] ) ) { |
|
111 | + $recaptcha_response = $data[ 'g-recaptcha-response' ]; |
|
112 | 112 | $recaptcha_handle = $submission_handler->handle_recaptcha( $recaptcha_response ); |
113 | - if ( isset( $recaptcha_handle['success'] ) && $recaptcha_handle['success'] === false ) { |
|
114 | - $process_submission_response = $submission_handler->wrap_form_submission_response( $recaptcha_handle['message'], $is_success = false ); |
|
113 | + if ( isset( $recaptcha_handle[ 'success' ] ) && $recaptcha_handle[ 'success' ] === false ) { |
|
114 | + $process_submission_response = $submission_handler->wrap_form_submission_response( $recaptcha_handle[ 'message' ], $is_success = false ); |
|
115 | 115 | return; |
116 | 116 | } |
117 | 117 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $merge_variables = $submission_handler->get_submitted_merge_values( $data, $form_fields ); |
121 | 121 | |
122 | 122 | // Submission Setting: Replace interest groups or update interest groups |
123 | -$replace_interests = isset( $submission_settings['replace_interests'] ) ? (bool) $submission_settings['replace_interests'] : true; |
|
123 | +$replace_interests = isset( $submission_settings[ 'replace_interests' ] ) ? (bool) $submission_settings[ 'replace_interests' ] : true; |
|
124 | 124 | |
125 | 125 | // Get the default groups |
126 | 126 | $groups = $submission_handler->get_default_interest_groups( $replace_interests, $list_handler ); |
@@ -135,17 +135,17 @@ discard block |
||
135 | 135 | * |
136 | 136 | * @param $merge_variables array Array of merge variable to use |
137 | 137 | */ |
138 | -do_action( 'yikes-mailchimp-before-submission', $merge_variables ); |
|
138 | +do_action( 'yikes-mailchimp-before-submission', $merge_variables ); |
|
139 | 139 | do_action( "yikes-mailchimp-before-submission-{$form_id}", $merge_variables ); |
140 | 140 | |
141 | 141 | // Allow users to check for form values (using the `yikes-mailchimp-filter-before-submission` filter hook in function `get_submitted_merge_values`) |
142 | 142 | // and pass back an error and message to the user |
143 | 143 | // If error is set and no message, default to our class variable's default error message |
144 | -if ( isset( $merge_variables['error'] ) ) { |
|
145 | - $merge_error_message = isset( $merge_variables['message'] ) ? $merge_variables['message'] : $submission_handler->default_error_response_message; |
|
146 | - $merge_vars_error_array = $submission_handler->handle_merge_variables_error( $merge_variables['error'], $merge_error_message ); |
|
147 | - if ( $merge_vars_error_array['success'] === false ) { |
|
148 | - $process_submission_response = $submission_handler->wrap_form_submission_response( $merge_vars_error_array['message'], $is_success = false ); |
|
144 | +if ( isset( $merge_variables[ 'error' ] ) ) { |
|
145 | + $merge_error_message = isset( $merge_variables[ 'message' ] ) ? $merge_variables[ 'message' ] : $submission_handler->default_error_response_message; |
|
146 | + $merge_vars_error_array = $submission_handler->handle_merge_variables_error( $merge_variables[ 'error' ], $merge_error_message ); |
|
147 | + if ( $merge_vars_error_array[ 'success' ] === false ) { |
|
148 | + $process_submission_response = $submission_handler->wrap_form_submission_response( $merge_vars_error_array[ 'message' ], $is_success = false ); |
|
149 | 149 | return; |
150 | 150 | } |
151 | 151 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | // Only add groups if they exist |
161 | 161 | if ( ! empty( $groups ) ) { |
162 | - $member_data['interests'] = $groups; |
|
162 | + $member_data[ 'interests' ] = $groups; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | // Check if this member already exists |
@@ -169,30 +169,30 @@ discard block |
||
169 | 169 | // Likewise, if this member exists but their status is 'pending' it means we're dealing with a double opt-in list and they never confirmed |
170 | 170 | // Or, if this member but their status is 'unsubscribed' it means we're dealing with someone who unsubscribed and they need to re-subscribe |
171 | 171 | // Continue as if they're a new member to force another double opt-in email |
172 | -$double_optin_resubscribe = is_array( $member_exists ) && isset( $member_exists['status'] ) && ( $member_exists['status'] === 'pending' || $member_exists['status'] === 'unsubscribed' ); |
|
172 | +$double_optin_resubscribe = is_array( $member_exists ) && isset( $member_exists[ 'status' ] ) && ( $member_exists[ 'status' ] === 'pending' || $member_exists[ 'status' ] === 'unsubscribed' ); |
|
173 | 173 | |
174 | 174 | if ( is_wp_error( $member_exists ) || $double_optin_resubscribe === true ) { |
175 | 175 | $new_subscriber = true; |
176 | 176 | |
177 | 177 | // Check the opt-in value - is it double or single? |
178 | 178 | // Double opt-in means 'status_if_new' => 'pending' |
179 | - $double_optin = isset( $optin_settings['optin'] ) ? (int) $optin_settings['optin'] : 0; |
|
179 | + $double_optin = isset( $optin_settings[ 'optin' ] ) ? (int) $optin_settings[ 'optin' ] : 0; |
|
180 | 180 | |
181 | 181 | // If the user was unsubscribed and is re-subscribing, we set the status to 'pending', which |
182 | 182 | // causes Mailchimp to send them a confirmation email. This is the only way Mailchimp will |
183 | 183 | // allow us to re-subscribe the user. |
184 | - $was_unsubscribed = is_array( $member_exists ) && isset( $member_exists['status'] ) && $member_exists['status'] === 'unsubscribed'; |
|
184 | + $was_unsubscribed = is_array( $member_exists ) && isset( $member_exists[ 'status' ] ) && $member_exists[ 'status' ] === 'unsubscribed'; |
|
185 | 185 | |
186 | 186 | if ( $double_optin === 1 || $was_unsubscribed === true ) { |
187 | 187 | |
188 | 188 | // Double opt-in |
189 | - $member_data['status_if_new'] = 'pending'; |
|
190 | - $member_data['status'] = 'pending'; |
|
189 | + $member_data[ 'status_if_new' ] = 'pending'; |
|
190 | + $member_data[ 'status' ] = 'pending'; |
|
191 | 191 | } else { |
192 | 192 | |
193 | 193 | // Single opt-in |
194 | - $member_data['status_if_new'] = 'subscribed'; |
|
195 | - $member_data['status'] = 'subscribed'; |
|
194 | + $member_data[ 'status_if_new' ] = 'subscribed'; |
|
195 | + $member_data[ 'status' ] = 'subscribed'; |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | } else { |
@@ -201,28 +201,28 @@ discard block |
||
201 | 201 | |
202 | 202 | // But first let's set our flag, and set the Mailchimp status flag |
203 | 203 | $new_subscriber = false; |
204 | - $member_data['status'] = 'subscribed'; |
|
204 | + $member_data[ 'status' ] = 'subscribed'; |
|
205 | 205 | |
206 | 206 | // Check our update_existing_user optin setting |
207 | - $update_existing_user = ( $optin_settings['update_existing_user'] === '1' ) ? true : false; |
|
207 | + $update_existing_user = ( $optin_settings[ 'update_existing_user' ] === '1' ) ? true : false; |
|
208 | 208 | |
209 | 209 | // If update_existing_user is false (not allowed) then simply fail and return a response message |
210 | 210 | if ( $update_existing_user === false ) { |
211 | 211 | $disallow_update_array = $submission_handler->handle_disallowed_existing_user_update(); |
212 | - if ( $disallow_update_array['success'] === false ) { |
|
213 | - $process_submission_response = $submission_handler->wrap_form_submission_response( $disallow_update_array['message'], $is_success = false ); |
|
212 | + if ( $disallow_update_array[ 'success' ] === false ) { |
|
213 | + $process_submission_response = $submission_handler->wrap_form_submission_response( $disallow_update_array[ 'message' ], $is_success = false ); |
|
214 | 214 | return; |
215 | 215 | } |
216 | 216 | } |
217 | 217 | |
218 | 218 | // If update_existing_user is true, we need to check our 'send_update_email' option |
219 | - $send_update_email = ( $optin_settings['send_update_email'] === '1' ) ? true : false; |
|
219 | + $send_update_email = ( $optin_settings[ 'send_update_email' ] === '1' ) ? true : false; |
|
220 | 220 | |
221 | 221 | // If $send_update_email is true (we send the email) then we need to fire off the 'send update email' logic |
222 | 222 | if ( $send_update_email === true ) { |
223 | 223 | $update_existing_user_array = $submission_handler->handle_updating_existing_user(); |
224 | - if ( $update_existing_user_array['success'] === false ) { |
|
225 | - $process_submission_response = $submission_handler->wrap_form_submission_response( $update_existing_user_array['message'], $is_success = false ); |
|
224 | + if ( $update_existing_user_array[ 'success' ] === false ) { |
|
225 | + $process_submission_response = $submission_handler->wrap_form_submission_response( $update_existing_user_array[ 'message' ], $is_success = false ); |
|
226 | 226 | return; |
227 | 227 | } |
228 | 228 | } |
@@ -258,9 +258,9 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | // Handle errors in the response |
261 | -if ( isset( $success_array ) && isset( $success_array['success'] ) && $success_array['success'] === false ) { |
|
262 | - $process_submission_response = isset( $success_array['message'] ) ? $success_array['message'] : ''; |
|
263 | - $process_submission_response = $submission_handler->wrap_form_submission_response( $success_array['message'], $is_success = false ); |
|
261 | +if ( isset( $success_array ) && isset( $success_array[ 'success' ] ) && $success_array[ 'success' ] === false ) { |
|
262 | + $process_submission_response = isset( $success_array[ 'message' ] ) ? $success_array[ 'message' ] : ''; |
|
263 | + $process_submission_response = $submission_handler->wrap_form_submission_response( $success_array[ 'message' ], $is_success = false ); |
|
264 | 264 | return; |
265 | 265 | } |
266 | 266 | |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | // For non-AJAX submissions, if we have a new subscriber we need to increment our submissions count by 1 |
271 | 271 | // For AJAX, this is an AJAX call that gets fired off after form submission |
272 | 272 | if ( $new_subscriber === true ) { |
273 | - $submissions = (int) $form_settings['submissions'] + 1; |
|
273 | + $submissions = (int) $form_settings[ 'submissions' ] + 1; |
|
274 | 274 | $interface->update_form_field( $form_id, 'submissions', $submissions ); |
275 | 275 | } |
276 | 276 |
@@ -7,12 +7,12 @@ |
||
7 | 7 | <div class="wrap"> |
8 | 8 | |
9 | 9 | <!-- Freddie Logo --> |
10 | - <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" /> |
|
10 | + <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" /> |
|
11 | 11 | |
12 | - <h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="https://yikesplugins.com/plugins/?plugins=Mailchimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1> |
|
12 | + <h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="https://yikesplugins.com/plugins/?plugins=Mailchimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1> |
|
13 | 13 | |
14 | 14 | <!-- Addons Page Description --> |
15 | - <p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
15 | + <p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin.", 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
16 | 16 | |
17 | 17 | <!-- Add-On Container --> |
18 | 18 | <section id="add-ons"> |
@@ -9,21 +9,21 @@ |
||
9 | 9 | <div class="wrap yikes-easy-mc-support-wrap"> |
10 | 10 | |
11 | 11 | <!-- Freddie Logo --> |
12 | - <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" /> |
|
12 | + <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" /> |
|
13 | 13 | |
14 | - <h1>Easy Forms for Mailchimp | <?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1> |
|
14 | + <h1>Easy Forms for Mailchimp | <?php _e( 'Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h1> |
|
15 | 15 | <!-- Support Page Description --> |
16 | - <p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
16 | + <p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
17 | 17 | |
18 | - <?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?> |
|
19 | - <p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
20 | - <p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p> |
|
18 | + <?php if ( get_option( 'yikes-easy-mc-active-addons', array() ) == array() ) { ?> |
|
19 | + <p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
20 | + <p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p> |
|
21 | 21 | <?php } else { ?> |
22 | - <p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
23 | - <p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
22 | + <p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request.", 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
23 | + <p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created.", 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
24 | 24 | <?php } ?> |
25 | 25 | |
26 | - <p><?php printf( __( 'Before submitting a support request, please visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p> |
|
26 | + <p><?php printf( __( 'Before submitting a support request, please visit our %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p> |
|
27 | 27 | |
28 | 28 | <hr /> |
29 | 29 |