@@ -118,8 +118,8 @@ |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * Save changes to a field's label |
|
122 | - */ |
|
121 | + * Save changes to a field's label |
|
122 | + */ |
|
123 | 123 | public function save_field_label_edits() { |
124 | 124 | |
125 | 125 | // Capture our $_POST variables |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function __construct() { |
13 | 13 | |
14 | 14 | // Ajax send merge variable to form builder. |
15 | - add_action( 'wp_ajax_add_field_to_form', array( $this , 'send_field_to_form' ), 10 ); |
|
15 | + add_action( 'wp_ajax_add_field_to_form', array( $this, 'send_field_to_form' ), 10 ); |
|
16 | 16 | |
17 | 17 | // Ajax send interest group to form builder. |
18 | 18 | add_action( 'wp_ajax_add_interest_group_to_form', array( $this, 'send_interest_group_to_form' ), 10 ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * - return a single container |
42 | 42 | */ |
43 | 43 | public function add_notification_to_form() { |
44 | - if ( isset( $_POST['notification_name'] ) ) { |
|
44 | + if ( isset( $_POST[ 'notification_name' ] ) ) { |
|
45 | 45 | include_once YIKES_MC_PATH . 'admin/partials/ajax/add_notification_to_form.php'; |
46 | 46 | } |
47 | 47 | exit(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // when the user wants to switch which form data |
52 | 52 | // is displayed on the dashboard |
53 | 53 | public function get_new_list_data() { |
54 | - $list_id = $_POST['list_id']; |
|
54 | + $list_id = $_POST[ 'list_id' ]; |
|
55 | 55 | $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_list( $list_id ); |
56 | 56 | if ( is_wp_error( $list_data ) ) { |
57 | 57 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging(); |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | /* note: this function is called statically from the integration settings page */ |
75 | 75 | public static function check_list_for_interest_groups( $list_id = '', $integration_type = '', $load = false ) { |
76 | 76 | if ( ! $list_id ) { |
77 | - $list_id = $_POST['list_id']; |
|
77 | + $list_id = $_POST[ 'list_id' ]; |
|
78 | 78 | } |
79 | 79 | if ( ! $integration_type ) { |
80 | - $integration_type = $_POST['integration']; |
|
80 | + $integration_type = $_POST[ 'integration' ]; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | if ( ! check_ajax_referer( 'add-tag', 'nonce', false ) ) { |
123 | 123 | wp_send_json_error( '1' ); |
124 | 124 | } |
125 | - $tags = isset( $_POST['tags'] ) ? wp_unslash( $_POST['tags'] ) : array(); |
|
126 | - $list_id = isset( $_POST['list_id'] ) ? filter_var( wp_unslash( $_POST['list_id'] ), FILTER_SANITIZE_STRING ) : ''; |
|
127 | - $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : 0; |
|
125 | + $tags = isset( $_POST[ 'tags' ] ) ? wp_unslash( $_POST[ 'tags' ] ) : array(); |
|
126 | + $list_id = isset( $_POST[ 'list_id' ] ) ? filter_var( wp_unslash( $_POST[ 'list_id' ] ), FILTER_SANITIZE_STRING ) : ''; |
|
127 | + $form_id = isset( $_POST[ 'form_id' ] ) ? filter_var( wp_unslash( $_POST[ 'form_id' ] ), FILTER_SANITIZE_NUMBER_INT ) : 0; |
|
128 | 128 | |
129 | 129 | if ( empty( $tags ) || empty( $list_id ) || empty( $form_id ) ) { |
130 | 130 | wp_send_json_error( '2' ); |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | |
137 | 137 | // This data came from $_POST so sanitize it. |
138 | 138 | foreach ( $tags as $tag ) { |
139 | - $form_tags[ filter_var( $tag['tag_id'], FILTER_SANITIZE_NUMBER_INT ) ] = array( |
|
140 | - 'name' => filter_var( $tag['tag_name'], FILTER_SANITIZE_STRING ), |
|
141 | - 'id' => filter_var( $tag['tag_id'], FILTER_SANITIZE_NUMBER_INT ), |
|
139 | + $form_tags[ filter_var( $tag[ 'tag_id' ], FILTER_SANITIZE_NUMBER_INT ) ] = array( |
|
140 | + 'name' => filter_var( $tag[ 'tag_name' ], FILTER_SANITIZE_STRING ), |
|
141 | + 'id' => filter_var( $tag[ 'tag_id' ], FILTER_SANITIZE_NUMBER_INT ), |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | |
145 | - $form['tags'] = $form_tags + ( isset( $form['tags'] ) ? $form['tags'] : array() ); |
|
145 | + $form[ 'tags' ] = $form_tags + ( isset( $form[ 'tags' ] ) ? $form[ 'tags' ] : array() ); |
|
146 | 146 | $form_interface->update_form( $form_id, $form ); |
147 | 147 | wp_send_json_success( array( 'tags' => $form_tags ) ); |
148 | 148 | } |
@@ -155,9 +155,9 @@ discard block |
||
155 | 155 | if ( ! check_ajax_referer( 'remove-tag', 'nonce', false ) ) { |
156 | 156 | wp_send_json_error( '1' ); |
157 | 157 | } |
158 | - $tag = isset( $_POST['tag'] ) ? filter_var( wp_unslash( $_POST['tag'] ), FILTER_SANITIZE_NUMBER_INT ) : array(); |
|
159 | - $list_id = isset( $_POST['list_id'] ) ? filter_var( wp_unslash( $_POST['list_id'] ), FILTER_SANITIZE_STRING ) : ''; |
|
160 | - $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : 0; |
|
158 | + $tag = isset( $_POST[ 'tag' ] ) ? filter_var( wp_unslash( $_POST[ 'tag' ] ), FILTER_SANITIZE_NUMBER_INT ) : array(); |
|
159 | + $list_id = isset( $_POST[ 'list_id' ] ) ? filter_var( wp_unslash( $_POST[ 'list_id' ] ), FILTER_SANITIZE_STRING ) : ''; |
|
160 | + $form_id = isset( $_POST[ 'form_id' ] ) ? filter_var( wp_unslash( $_POST[ 'form_id' ] ), FILTER_SANITIZE_NUMBER_INT ) : 0; |
|
161 | 161 | |
162 | 162 | if ( empty( $tag ) || empty( $list_id ) || empty( $form_id ) ) { |
163 | 163 | wp_send_json_error( '2' ); |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | |
166 | 166 | $form_interface = yikes_easy_mailchimp_extender_get_form_interface(); |
167 | 167 | $form = $form_interface->get_form( $form_id ); |
168 | - if ( isset( $form['tags'] ) && isset( $form['tags'][ $tag ] ) ) { |
|
169 | - unset( $form['tags'][ $tag ] ); |
|
168 | + if ( isset( $form[ 'tags' ] ) && isset( $form[ 'tags' ][ $tag ] ) ) { |
|
169 | + unset( $form[ 'tags' ][ $tag ] ); |
|
170 | 170 | } |
171 | 171 | $form_interface->update_form( $form_id, $form ); |
172 | 172 | wp_send_json_success(); |
@@ -190,10 +190,10 @@ discard block |
||
190 | 190 | public function save_field_label_edits() { |
191 | 191 | |
192 | 192 | // Capture our $_POST variables |
193 | - $list_id = isset( $_POST['list_id'] ) ? $_POST['list_id'] : ''; |
|
194 | - $field_data = isset( $_POST['field_data'] ) ? $_POST['field_data'] : array(); |
|
195 | - $field_name = isset( $field_data['field_name'] ) ? $field_data['field_name'] : ''; |
|
196 | - $field_id = isset( $field_data['field_id'] ) ? $field_data['field_id'] : ''; |
|
193 | + $list_id = isset( $_POST[ 'list_id' ] ) ? $_POST[ 'list_id' ] : ''; |
|
194 | + $field_data = isset( $_POST[ 'field_data' ] ) ? $_POST[ 'field_data' ] : array(); |
|
195 | + $field_name = isset( $field_data[ 'field_name' ] ) ? $field_data[ 'field_name' ] : ''; |
|
196 | + $field_id = isset( $field_data[ 'field_id' ] ) ? $field_data[ 'field_id' ] : ''; |
|
197 | 197 | |
198 | 198 | // Make sure we have our required variables before continuing |
199 | 199 | if ( $list_id === '' || $field_name === '' || $field_id === '' ) { |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
9 | 9 | // users can only unisntall a plugin from the network dashboard page |
10 | 10 | // Get all blog ids |
11 | - $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); |
|
11 | + $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); |
|
12 | 12 | foreach ( $blogids as $blog_id ) { |
13 | 13 | switch_to_blog( $blog_id ); |
14 | 14 | self::_uninstall_yikes_easy_mailchimp( $wpdb ); |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | * @since 6.0.0 |
29 | 29 | */ |
30 | 30 | static function _uninstall_yikes_easy_mailchimp( $wpdb ) { |
31 | - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
31 | + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
32 | 32 | |
33 | 33 | /* Clean up and delete our custom table from the databse */ |
34 | - $table = $wpdb->prefix."yikes_easy_mc_forms"; |
|
34 | + $table = $wpdb->prefix . "yikes_easy_mc_forms"; |
|
35 | 35 | $sql = 'DROP TABLE IF EXISTS ' . $table; |
36 | 36 | |
37 | 37 | //Delete any options thats stored also? |
38 | 38 | $wpdb->query( $sql ); |
39 | - dbDelta($sql); |
|
39 | + dbDelta( $sql ); |
|
40 | 40 | |
41 | 41 | /* Clear All Transient Data */ |
42 | 42 | delete_transient( 'yikes-easy-mailchimp-list-data' ); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
36 | 36 | <span class="dashicons dashicons-external"></span></a> |
37 | 37 | </div> |
38 | 38 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
36 | 36 | <span class="dashicons dashicons-external"></span></a> |
37 | 37 | </div> |
38 | 38 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | <div class="addon-footer-wrap give-clearfix"> |
34 | 34 | <a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank"> |
35 | - <?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
35 | + <?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?> |
|
36 | 36 | <span class="dashicons dashicons-external"></span></a> |
37 | 37 | </div> |
38 | 38 |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
73 | - * Create our own custom the_content(); filter to prevent plugins and such from hooking in where not wanted |
|
74 | - * |
|
75 | - * @since 6.0.3 |
|
76 | - */ |
|
73 | + * Create our own custom the_content(); filter to prevent plugins and such from hooking in where not wanted |
|
74 | + * |
|
75 | + * @since 6.0.3 |
|
76 | + */ |
|
77 | 77 | public function yikes_custom_frontend_content_filter() { |
78 | 78 | add_filter( 'yikes-mailchimp-frontend-content', 'wptexturize' ); |
79 | 79 | add_filter( 'yikes-mailchimp-frontend-content', 'convert_smilies' ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * load our checkbox classes |
91 | 91 | * |
92 | 92 | * @since 6.0.0 |
93 | - **/ |
|
93 | + **/ |
|
94 | 94 | public function load_checkbox_integration_classes() { |
95 | 95 | // store our options |
96 | 96 | $integrations = get_option( 'optin-checkbox-init' , array() ); |
@@ -133,7 +133,8 @@ |
||
133 | 133 | if( $form_id ) { |
134 | 134 | $form_settings = self::yikes_retrieve_form_settings( $form_id ); |
135 | 135 | if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) { |
136 | - if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted |
|
136 | + if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { |
|
137 | +// ensure we only process the form that was submitted |
|
137 | 138 | |
138 | 139 | // Lets include our form processing file |
139 | 140 | include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' ); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | new YIKES_Inc_Easy_Mailchimp_Public_Ajax(); |
58 | 58 | |
59 | 59 | // Include our error logging class |
60 | - add_action( 'init' , array( $this , 'load_error_logging_class' ) , 1 ); |
|
60 | + add_action( 'init', array( $this, 'load_error_logging_class' ), 1 ); |
|
61 | 61 | // load our checkbox classes |
62 | - add_action( 'init' , array( $this , 'load_checkbox_integration_classes' ) , 1 ); |
|
62 | + add_action( 'init', array( $this, 'load_checkbox_integration_classes' ), 1 ); |
|
63 | 63 | // custom front end filter |
64 | 64 | add_action( 'init', array( $this, 'yikes_custom_frontend_content_filter' ) ); |
65 | 65 | // Process non-ajax forms in the header |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | **/ |
95 | 95 | public function load_checkbox_integration_classes() { |
96 | 96 | // store our options |
97 | - $integrations = get_option( 'optin-checkbox-init' , array() ); |
|
98 | - if( ! empty( $integrations ) && is_array( $integrations ) ) { |
|
97 | + $integrations = get_option( 'optin-checkbox-init', array() ); |
|
98 | + if ( ! empty( $integrations ) && is_array( $integrations ) ) { |
|
99 | 99 | // load our mail integrations class |
100 | 100 | require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations.php'; |
101 | 101 | // loop over selected classes and load them up! |
102 | - foreach( $integrations as $integration => $value ) { |
|
103 | - if( isset( $value['value'] ) && $value['value'] == 'on' ) { |
|
102 | + foreach ( $integrations as $integration => $value ) { |
|
103 | + if ( isset( $value[ 'value' ] ) && $value[ 'value' ] == 'on' ) { |
|
104 | 104 | // load our class extensions |
105 | - require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.'.$integration.'-checkbox.php'; |
|
105 | + require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.' . $integration . '-checkbox.php'; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * @since 6.0.0 |
117 | 117 | */ |
118 | 118 | public function load_error_logging_class() { |
119 | - if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) { |
|
119 | + if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) { |
|
120 | 120 | // if error logging is enabled we should include our error logging class |
121 | 121 | require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php'; |
122 | 122 | $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging; |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | * @since 6.0.3.4 |
130 | 130 | */ |
131 | 131 | public function yikes_process_non_ajax_forms( $form_submitted ) { |
132 | - global $wpdb,$post; |
|
133 | - $form_id = ( ! empty( $_POST['yikes-mailchimp-submitted-form'] ) ) ? (int) $_POST['yikes-mailchimp-submitted-form'] : false; // store form id |
|
134 | - if( $form_id ) { |
|
132 | + global $wpdb, $post; |
|
133 | + $form_id = ( ! empty( $_POST[ 'yikes-mailchimp-submitted-form' ] ) ) ? (int) $_POST[ 'yikes-mailchimp-submitted-form' ] : false; // store form id |
|
134 | + if ( $form_id ) { |
|
135 | 135 | $form_settings = self::yikes_retrieve_form_settings( $form_id ); |
136 | - if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) { |
|
137 | - if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted |
|
136 | + if ( isset( $_POST ) && ! empty( $_POST ) && isset( $form_id ) && $form_settings[ 'submission_settings' ][ 'ajax' ] == 0 ) { |
|
137 | + if ( $_POST[ 'yikes-mailchimp-submitted-form' ] == $form_id ) { // ensure we only process the form that was submitted |
|
138 | 138 | |
139 | 139 | // Lets include our form processing file |
140 | 140 | include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' ); |
141 | - if( $form_settings['submission_settings']['redirect_on_submission'] == '1' ) { |
|
142 | - if( $form_submitted == 1 ) { |
|
141 | + if ( $form_settings[ 'submission_settings' ][ 'redirect_on_submission' ] == '1' ) { |
|
142 | + if ( $form_submitted == 1 ) { |
|
143 | 143 | // decode our settings |
144 | - $redirect_page = ( 'custom_url' != $form_settings['submission_settings']['redirect_page'] ) ? get_permalink( (int) $form_settings['submission_settings']['redirect_page'] ) : $form_settings['submission_settings']['custom_redirect_url']; |
|
144 | + $redirect_page = ( 'custom_url' != $form_settings[ 'submission_settings' ][ 'redirect_page' ] ) ? get_permalink( (int) $form_settings[ 'submission_settings' ][ 'redirect_page' ] ) : $form_settings[ 'submission_settings' ][ 'custom_redirect_url' ]; |
|
145 | 145 | wp_redirect( apply_filters( 'yikes-mailchimp-redirect-url', esc_url( $redirect_page ), $form_id, $post ) ); |
146 | 146 | exit; |
147 | 147 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | */ |
170 | 170 | public static function yikes_retrieve_form_settings( $form_id ) { |
171 | 171 | // if no form id, abort |
172 | - if( ! $form_id ) { |
|
172 | + if ( ! $form_id ) { |
|
173 | 173 | return array(); |
174 | 174 | } |
175 | 175 | |
@@ -198,13 +198,13 @@ discard block |
||
198 | 198 | return; |
199 | 199 | } |
200 | 200 | // trim trailing period |
201 | - if ( isset( $form_settings['error_messages']['update-link'] ) && ! empty( $form_settings['error_messages']['update-link'] ) ) { |
|
202 | - $response_text = $form_settings['error_messages']['update-link']; |
|
201 | + if ( isset( $form_settings[ 'error_messages' ][ 'update-link' ] ) && ! empty( $form_settings[ 'error_messages' ][ 'update-link' ] ) ) { |
|
202 | + $response_text = $form_settings[ 'error_messages' ][ 'update-link' ]; |
|
203 | 203 | // extract the link text |
204 | 204 | preg_match( '/\[link].*?\[\/link\]/', $response_text, $link_text ); |
205 | 205 | if ( $link_text && ! empty( $link_text ) ) { |
206 | 206 | // Extract the custom link text ([link]*[/link]) |
207 | - $custom_link_text = str_replace( '[/link]', '', str_replace( '[link]', '', str_replace( 'click to send yourself an update link', $link_text[0], $link ) ) ); |
|
207 | + $custom_link_text = str_replace( '[/link]', '', str_replace( '[link]', '', str_replace( 'click to send yourself an update link', $link_text[ 0 ], $link ) ) ); |
|
208 | 208 | // Replace the link text, with our custom link text |
209 | 209 | $response_text = str_replace( $link_text, $custom_link_text, $response_text ); |
210 | 210 | } |
@@ -233,8 +233,8 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | // trim trailing period |
236 | - if ( isset( $form_settings['error_messages']['already-subscribed'] ) && ! empty( $form_settings['error_messages']['already-subscribed'] ) ) { |
|
237 | - $response_text = str_replace( '[email]', $email, $form_settings['error_messages']['already-subscribed'] ); |
|
236 | + if ( isset( $form_settings[ 'error_messages' ][ 'already-subscribed' ] ) && ! empty( $form_settings[ 'error_messages' ][ 'already-subscribed' ] ) ) { |
|
237 | + $response_text = str_replace( '[email]', $email, $form_settings[ 'error_messages' ][ 'already-subscribed' ] ); |
|
238 | 238 | } |
239 | 239 | // Return our new string |
240 | 240 | return $response_text; |
@@ -5,10 +5,10 @@ discard block |
||
5 | 5 | <div id="col-left"> |
6 | 6 | |
7 | 7 | <div class="col-wrap"> |
8 | - <h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span> <?php _e( 'WordPress.org Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1> |
|
8 | + <h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span> <?php _e( 'WordPress.org Plugin Directory', 'yikes-inc-easy-mailchimp-extender' ); ?></h1> |
|
9 | 9 | <div class="inside"> |
10 | 10 | <p><?php _e( 'Use your WordPress.org username to submit support requests on the WordPress Directory support forum.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
11 | - <img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" > |
|
11 | + <img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" > |
|
12 | 12 | <a href="https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit a New WordPress.org Support Request', 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
13 | 13 | </div> |
14 | 14 | </div> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | printf( '<h2>' . esc_attr__( 'Popular Knowledge Base Articles', 'yikes-inc-easy-mailchimp-extender' ) . '</h2>' ); |
61 | 61 | printf( '<ol>' ); |
62 | 62 | foreach ( $knowledge_base_links as $kb_link ) { |
63 | - echo wp_kses_post( '<li><a href="' . esc_url( $kb_link['href'] ) . '" title="' . esc_attr( $kb_link['title'] ) . '" target="_blank">' . esc_attr( $kb_link['title'] ) . '</a></li>' ); |
|
63 | + echo wp_kses_post( '<li><a href="' . esc_url( $kb_link[ 'href' ] ) . '" title="' . esc_attr( $kb_link[ 'title' ] ) . '" target="_blank">' . esc_attr( $kb_link[ 'title' ] ) . '</a></li>' ); |
|
64 | 64 | } |
65 | 65 | printf( '</ol>' ); |
66 | 66 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | <h2 class="premium-support-title"><?php _e( 'Priority & Add-on Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h2> |
7 | 7 | |
8 | 8 | <?php |
9 | - if ( isset( $_POST['submit-premium-support-request'] ) ) { |
|
9 | + if ( isset( $_POST[ 'submit-premium-support-request' ] ) ) { |
|
10 | 10 | ?> |
11 | 11 | <h4><?php _e( 'Success!', 'yikes-inc-easy-mailchimp-extender' ); ?></h2> |
12 | 12 | <p><?php _e( 'We have received your support request and will get in touch shortly regarding your issue.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | ?> |
16 | 16 | |
17 | 17 | <!-- Premium Support Form --> |
18 | - <form id="premium-support-form" method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-support#premium-support-form' ) ); ?>" <?php echo (isset($_POST['submit-premium-support-request'])) ? 'class="support-form-hidden"' : ''; ?>> |
|
18 | + <form id="premium-support-form" method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-support#premium-support-form' ) ); ?>" <?php echo ( isset( $_POST[ 'submit-premium-support-request' ] ) ) ? 'class="support-form-hidden"' : ''; ?>> |
|
19 | 19 | |
20 | 20 | <label><?php _e( 'Add-On:', 'yikes-inc-easy-mailchimp-extender' ); ?> |
21 | 21 | <select name="license_key" id="license-key"> |
@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | // get the license for the respective extension |
26 | 26 | $options = get_option( 'yikes-mailchimp-' . $extension . '-settings', array() ); |
27 | 27 | |
28 | - if ( isset( $options['license'] ) && $options['status'] == 'valid' ) { |
|
29 | - echo '<option data-plugin-slug="' . esc_attr( $extension ) . '" data-plugin-name="' . esc_attr( ucwords( str_replace( '-', ' ', $extension ) ) ) . '" value="' . esc_attr( trim( $options['license'] ) ) . '">' . ucwords( str_replace( '-', ' ', $extension ) ) . ' ' . '</option>'; |
|
28 | + if ( isset( $options[ 'license' ] ) && $options[ 'status' ] == 'valid' ) { |
|
29 | + echo '<option data-plugin-slug="' . esc_attr( $extension ) . '" data-plugin-name="' . esc_attr( ucwords( str_replace( '-', ' ', $extension ) ) ) . '" value="' . esc_attr( trim( $options[ 'license' ] ) ) . '">' . ucwords( str_replace( '-', ' ', $extension ) ) . ' ' . '</option>'; |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | ?> |
33 | 33 | </select> |
34 | - <p class="description"><?php _e( 'Select the add-on that you are looking for help with.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
34 | + <p class="description"><?php _e( 'Select the add-on that you are looking for help with.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
35 | 35 | |
36 | 36 | <input type="hidden" name="plugin-slug" id="plugin-slug" value=""> |
37 | 37 | <input type="hidden" name="plugin-name" id="plugin-name" value=""> |
@@ -39,31 +39,31 @@ discard block |
||
39 | 39 | |
40 | 40 | <label><?php _e( 'Name:', 'yikes-inc-easy-mailchimp-extender' ); ?> |
41 | 41 | <input type="text" name="user-name" required> |
42 | - <p class="description"><?php _e( 'Enter your name.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
42 | + <p class="description"><?php _e( 'Enter your name.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
43 | 43 | </label> |
44 | 44 | |
45 | 45 | <label><?php _e( 'Contact Email:', 'yikes-inc-easy-mailchimp-extender' ); ?> |
46 | 46 | <input type="email" name="user-email" required> |
47 | - <p class="description"><?php _e( 'Enter the email address you would prefer to be contact at.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
47 | + <p class="description"><?php _e( 'Enter the email address you would prefer to be contact at.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
48 | 48 | </label> |
49 | 49 | |
50 | 50 | <label><?php _e( 'Topic:', 'yikes-inc-easy-mailchimp-extender' ); ?> |
51 | 51 | <input type="text" name="support-topic" required> |
52 | - <p class="description"><?php _e( 'Pleae enter the topic of your support request.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
52 | + <p class="description"><?php _e( 'Pleae enter the topic of your support request.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
53 | 53 | </label> |
54 | 54 | |
55 | 55 | <label><?php _e( 'Priority:', 'yikes-inc-easy-mailchimp-extender' ); ?> |
56 | 56 | <select name="support-priority"> |
57 | - <option value="1"><?php _e( 'Low' , 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
58 | - <option value="2"><?php _e( 'Medium' , 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
59 | - <option value="3"><?php _e( 'High' , 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
60 | - <option value="4"><?php _e( 'Urgent' , 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
57 | + <option value="1"><?php _e( 'Low', 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
58 | + <option value="2"><?php _e( 'Medium', 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
59 | + <option value="3"><?php _e( 'High', 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
60 | + <option value="4"><?php _e( 'Urgent', 'yikes-inc-easy-mailchimp-extender' ); ?></option> |
|
61 | 61 | </select> |
62 | - <p class="description"><?php _e( 'Select the priority of this ticket.' , 'yikes-inc-easy-mailchimp-extender' ); ?><em><?php _e( 'Note: Please do not abuse "urgent".' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></p> |
|
62 | + <p class="description"><?php _e( 'Select the priority of this ticket.', 'yikes-inc-easy-mailchimp-extender' ); ?><em><?php _e( 'Note: Please do not abuse "urgent".', 'yikes-inc-easy-mailchimp-extender' ); ?></em></p> |
|
63 | 63 | </label> |
64 | 64 | <label><?php _e( 'Issue:', 'yikes-inc-easy-mailchimp-extender' ); ?> |
65 | 65 | <?php wp_editor( '', 'support-content', array( 'textarea_name' => 'support-content', 'media_buttons' => false ) ); ?> |
66 | - <p class="description"><?php _e( 'Enter as much detail about the issue you are encontering as possible. After we make initial contact you can attach any screenshots necessary.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
66 | + <p class="description"><?php _e( 'Enter as much detail about the issue you are encontering as possible. After we make initial contact you can attach any screenshots necessary.', 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
67 | 67 | </label> |
68 | 68 | |
69 | 69 | <input type="hidden" name="action" value="yikes-support-request"> |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $email_field = apply_filters( 'yikes-easy-mailchimp-email-address-field', $email_field, $list_id ); |
175 | 175 | |
176 | 176 | array_unshift( $merge_fields, $email_field ); |
177 | - $merge_object['merge_fields'] = $merge_fields; |
|
177 | + $merge_object[ 'merge_fields' ] = $merge_fields; |
|
178 | 178 | set_transient( "yikes_eme_merge_variables_{$list_id}", $merge_object, HOUR_IN_SECONDS ); |
179 | 179 | |
180 | 180 | return $merge_object; |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | * @return array | WP_Error |
196 | 196 | */ |
197 | 197 | public function update_merge_field( $list_id, $field_id, $field_data, $clear_transient = true ) { |
198 | - $path = "{$this->base_path}/{$list_id}/merge-fields/{$field_id}"; |
|
199 | - $field = $this->patch_to_api( $path, $field_data ); |
|
198 | + $path = "{$this->base_path}/{$list_id}/merge-fields/{$field_id}"; |
|
199 | + $field = $this->patch_to_api( $path, $field_data ); |
|
200 | 200 | |
201 | 201 | if ( is_wp_error( $field ) ) { |
202 | 202 | return $field; |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | return $interests; |
245 | 245 | } |
246 | 246 | |
247 | - $category['items'] = $interests; |
|
247 | + $category[ 'items' ] = $interests; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | set_transient( "yikes_eme_interest_categories_{$list_id}", $categories, HOUR_IN_SECONDS ); |
@@ -181,19 +181,19 @@ |
||
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
184 | - * Update a merge field for a particular list |
|
185 | - * |
|
186 | - * @author Kevin Utz |
|
187 | - * |
|
188 | - * @since 6.3.3 |
|
189 | - * |
|
190 | - * @param string | $list_id | The ID of the Mailchimp list |
|
191 | - * @param string | $field_id | The ID of the merge field |
|
192 | - * @param array | $field_data | An array of field data constituting the body of our API request |
|
193 | - * @param bool | $clear_transient | Flag whether we should delete the transients associated with this list |
|
194 | - * |
|
195 | - * @return array | WP_Error |
|
196 | - */ |
|
184 | + * Update a merge field for a particular list |
|
185 | + * |
|
186 | + * @author Kevin Utz |
|
187 | + * |
|
188 | + * @since 6.3.3 |
|
189 | + * |
|
190 | + * @param string | $list_id | The ID of the Mailchimp list |
|
191 | + * @param string | $field_id | The ID of the merge field |
|
192 | + * @param array | $field_data | An array of field data constituting the body of our API request |
|
193 | + * @param bool | $clear_transient | Flag whether we should delete the transients associated with this list |
|
194 | + * |
|
195 | + * @return array | WP_Error |
|
196 | + */ |
|
197 | 197 | public function update_merge_field( $list_id, $field_id, $field_data, $clear_transient = true ) { |
198 | 198 | $path = "{$this->base_path}/{$list_id}/merge-fields/{$field_id}"; |
199 | 199 | $field = $this->patch_to_api( $path, $field_data ); |