@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | class Yikes_Inc_Easy_Mailchimp_Extender_Helper { |
8 | 8 | |
9 | 9 | /** |
10 | - * Helper functions to help out with extensions (still fleshing out) |
|
11 | - * @since 6.0 |
|
12 | - * @ Parameters (array of data) |
|
13 | - * - Section ID - id of the section, should be a slug style text ie: 'custom-section' |
|
14 | - * - Link Text - Visible text for this link ie: 'Custom Section' |
|
15 | - * - Dashicon - class of the icon you would like to use for this link |
|
16 | - **/ |
|
10 | + * Helper functions to help out with extensions (still fleshing out) |
|
11 | + * @since 6.0 |
|
12 | + * @ Parameters (array of data) |
|
13 | + * - Section ID - id of the section, should be a slug style text ie: 'custom-section' |
|
14 | + * - Link Text - Visible text for this link ie: 'Custom Section' |
|
15 | + * - Dashicon - class of the icon you would like to use for this link |
|
16 | + **/ |
|
17 | 17 | public static function add_edit_form_section_link( $link_array=array() ) { |
18 | 18 | if( !empty( $link_array ) ) { |
19 | 19 | $link_data = wp_parse_args( array() , $link_array ); |
@@ -36,17 +36,17 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | - * Helper functions to help out with extensions (still fleshing out) |
|
40 | - * @since 6.0 |
|
41 | - * @ Parameters: |
|
42 | - * - Section ID - id of the section, should be a slug style text ie: 'custom-section' |
|
43 | - * - Class - class file to call function from? |
|
44 | - * - Main Callback - call back for main section |
|
45 | - * - Main Section Title - main section title |
|
46 | - * - Sidebar Callback - callback for the sidebar section |
|
47 | - * - Sidebar Title - title of the sidebar section |
|
48 | - * - Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class)) |
|
49 | - **/ |
|
39 | + * Helper functions to help out with extensions (still fleshing out) |
|
40 | + * @since 6.0 |
|
41 | + * @ Parameters: |
|
42 | + * - Section ID - id of the section, should be a slug style text ie: 'custom-section' |
|
43 | + * - Class - class file to call function from? |
|
44 | + * - Main Callback - call back for main section |
|
45 | + * - Main Section Title - main section title |
|
46 | + * - Sidebar Callback - callback for the sidebar section |
|
47 | + * - Sidebar Title - title of the sidebar section |
|
48 | + * - Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class)) |
|
49 | + **/ |
|
50 | 50 | public static function add_edit_form_section( $section_array=array() ) { |
51 | 51 | if( !empty( $section_array ) ) { |
52 | 52 | $section_data = wp_parse_args( array() , $section_array ); |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * Check if the custom section is single or two columns (with sidebar) |
|
63 | - * @since 6.0 |
|
64 | - * @Parameters: |
|
65 | - * - Section Data - the array of data associated with the custom field you've set up |
|
66 | - */ |
|
62 | + * Check if the custom section is single or two columns (with sidebar) |
|
63 | + * @since 6.0 |
|
64 | + * @Parameters: |
|
65 | + * - Section Data - the array of data associated with the custom field you've set up |
|
66 | + */ |
|
67 | 67 | public static function is_custom_section_two_column( $custom_section_data ) { |
68 | 68 | // print_r( $custom_section_data ); |
69 | 69 | $value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ? true : false; |
@@ -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'](); |
@@ -54,7 +54,8 @@ |
||
54 | 54 | foreach( $new_settings as $option_name => $option_value ) { |
55 | 55 | update_option( $option_name, $option_value ); |
56 | 56 | } |
57 | - } else { // if it's not, then it's an opt-in forms import |
|
57 | + } else { |
|
58 | +// if it's not, then it's an opt-in forms import |
|
58 | 59 | // If this is the first row, then it should be title data. |
59 | 60 | if ( 1 === $row ) { |
60 | 61 | $titles = $line; |
@@ -302,9 +302,9 @@ |
||
302 | 302 | ?></ul><?php |
303 | 303 | } |
304 | 304 | /** |
305 | - * Custom action hook for our add-ons to hook into |
|
306 | - * @since 6.0.3.8 |
|
307 | - */ |
|
305 | + * Custom action hook for our add-ons to hook into |
|
306 | + * @since 6.0.3.8 |
|
307 | + */ |
|
308 | 308 | do_action( 'yikes-mailchimp-list-form-fields-metabox' ); |
309 | 309 | ?> |
310 | 310 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @subpackage Yikes_Inc_Easy_Mailchimp_Extender/includes |
20 | 20 | * @author YIKES Inc. <[email protected]> |
21 | 21 | */ |
22 | -class Yikes_Inc_Easy_Mailchimp_Extender_Loader { |
|
22 | +class Yikes_Inc_Easy_Mailchimp_Extender_Loader { |
|
23 | 23 | /** |
24 | 24 | * The array of actions registered with WordPress. |
25 | 25 | * |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @since 6.0.0 |
43 | 43 | */ |
44 | - public function __construct() { |
|
44 | + public function __construct() { |
|
45 | 45 | $this->actions = array(); |
46 | 46 | $this->filters = array(); |
47 | 47 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @param int Optional $priority The priority at which the function should be fired. |
56 | 56 | * @param int Optional $accepted_args The number of arguments that should be passed to the $callback. |
57 | 57 | */ |
58 | - public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { |
|
58 | + public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { |
|
59 | 59 | $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args ); |
60 | 60 | } |
61 | 61 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param int Optional $priority The priority at which the function should be fired. |
69 | 69 | * @param int Optional $accepted_args The number of arguments that should be passed to the $callback. |
70 | 70 | */ |
71 | - public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { |
|
71 | + public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { |
|
72 | 72 | $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args ); |
73 | 73 | } |
74 | 74 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @param int Optional $accepted_args The number of arguments that should be passed to the $callback. |
86 | 86 | * @return type The collection of actions and filters registered with WordPress. |
87 | 87 | */ |
88 | - private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) { |
|
88 | + private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) { |
|
89 | 89 | $hooks[] = array( |
90 | 90 | 'hook' => $hook, |
91 | 91 | 'component' => $component, |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | * |
101 | 101 | * @since 6.0.0 |
102 | 102 | */ |
103 | - public function run() { |
|
104 | - foreach ( $this->filters as $hook ) { |
|
103 | + public function run() { |
|
104 | + foreach ( $this->filters as $hook ) { |
|
105 | 105 | add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] ); |
106 | 106 | } |
107 | - foreach ( $this->actions as $hook ) { |
|
107 | + foreach ( $this->actions as $hook ) { |
|
108 | 108 | add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] ); |
109 | 109 | } |
110 | 110 | } |
@@ -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 |
@@ -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' ); |
@@ -474,7 +474,9 @@ discard block |
||
474 | 474 | $field_array['required'] = isset( $field['require'] ) ? 'required="required"' : ''; |
475 | 475 | $label_array['visible'] = isset( $field['hide'] ) ? 'style="display:none;"' : ''; |
476 | 476 | $label_class_array[] = ( $tag === 'merge' ) ? $field['merge'] . '-label' : $field['group_id'] . '-label'; |
477 | - if ( isset( $field['require'] ) ) $label_class_array[] = 'yikes-mailchimp-field-required'; |
|
477 | + if ( isset( $field['require'] ) ) { |
|
478 | + $label_class_array[] = 'yikes-mailchimp-field-required'; |
|
479 | + } |
|
478 | 480 | } |
479 | 481 | |
480 | 482 | // if both hide label and hide field are checked, we gotta hide the field! |
@@ -761,7 +763,7 @@ discard block |
||
761 | 763 | } else { |
762 | 764 | $zip_value = $_POST[$field['merge']]; |
763 | 765 | } |
764 | - } else { |
|
766 | + } else { |
|
765 | 767 | |
766 | 768 | /** |
767 | 769 | * A filter to set the default zip code value. |
@@ -1125,7 +1127,7 @@ discard block |
||
1125 | 1127 | echo $no_default === true ? '<option value="">' . $no_default_name . '</option>' : ''; |
1126 | 1128 | |
1127 | 1129 | $i = 0; |
1128 | - foreach( $groups as $group_id => $name ) { |
|
1130 | + foreach( $groups as $group_id => $name ) { |
|
1129 | 1131 | |
1130 | 1132 | // If the form was submitted and failed, set the submitted/chosen values as the default |
1131 | 1133 | if( isset( $_POST[ 'group-' . $field['group_id'] ] ) && $form_submitted === 0 ) { |
@@ -1174,7 +1176,7 @@ discard block |
||
1174 | 1176 | // Turn $default_choice into an array if it isn't already |
1175 | 1177 | $default_choice = ( isset( $default_choice ) && is_array( $default_choice ) ) ? $default_choice : array( $default_choice ); |
1176 | 1178 | |
1177 | - foreach( $groups as $group_id => $name ) { |
|
1179 | + foreach( $groups as $group_id => $name ) { |
|
1178 | 1180 | ?> |
1179 | 1181 | <label for="<?php echo esc_attr( $field['group_id'] ) . '-' . $i; ?>" class="yikes-easy-mc-checkbox-label <?php echo implode( ' ' , $custom_classes ); if ( $x === $count ) { echo ' last-selection'; } ?>" style="display:none;"> |
1180 | 1182 | <input |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
139 | - * If login is required, abort |
|
140 | - * @since 6.0.3.8 |
|
141 | - */ |
|
139 | + * If login is required, abort |
|
140 | + * @since 6.0.3.8 |
|
141 | + */ |
|
142 | 142 | if( $form_login_required ) { |
143 | 143 | if( apply_filters( 'yikes-mailchimp-required-login-requirement', ! is_user_logged_in() ) ) { |
144 | 144 | ob_start(); |
@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
156 | - * Check if schedule is set for this form |
|
157 | - * @since 6.0.3.8 |
|
158 | - */ |
|
156 | + * Check if schedule is set for this form |
|
157 | + * @since 6.0.3.8 |
|
158 | + */ |
|
159 | 159 | if( $form_schedule_state ) { |
160 | 160 | // store current date |
161 | 161 | $current_date = strtotime( current_time( 'm/d/Y g:iA' ) ); |
@@ -190,8 +190,8 @@ discard block |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
193 | - * Check for form inline parameter |
|
194 | - */ |
|
193 | + * Check for form inline parameter |
|
194 | + */ |
|
195 | 195 | $form_inline = ( $atts['inline'] == 1 || $atts['inline'] == 'true' || get_theme_mod( 'form-inline-' . $form_id, '' ) === true ); // form-inline-{$form_id} comes from customizer extension |
196 | 196 | // recheck from our form options |
197 | 197 | if ( ! $form_inline ) { |
@@ -290,21 +290,21 @@ discard block |
||
290 | 290 | /**** Set up any filter'able content (that needs to be filtered before the rest of the logic kicks off) ****/ |
291 | 291 | |
292 | 292 | /** |
293 | - * yikes-mailchimp-countries-with-zip |
|
294 | - * |
|
295 | - * Filter which countries show the zip field |
|
296 | - * |
|
297 | - * @param array | An array of country codes that the zip field will appear for - default: US, GB, CA |
|
298 | - * Note: please return the array with the country code as the KEY! This allows for optimal searching. |
|
299 | - * @param int | $form_id |
|
300 | - */ |
|
293 | + * yikes-mailchimp-countries-with-zip |
|
294 | + * |
|
295 | + * Filter which countries show the zip field |
|
296 | + * |
|
297 | + * @param array | An array of country codes that the zip field will appear for - default: US, GB, CA |
|
298 | + * Note: please return the array with the country code as the KEY! This allows for optimal searching. |
|
299 | + * @param int | $form_id |
|
300 | + */ |
|
301 | 301 | $countries_with_zip_code_field = apply_filters( 'yikes-mailchimp-countries-with-zip', |
302 | 302 | array( 'US' => 'US', 'GB' => 'GB', 'CA' => 'CA', |
303 | - 'IE' => 'IE', 'CN' => 'CN', 'IN' => 'IN', |
|
304 | - 'AU' => 'AU', 'BR' => 'BR', 'MX' => 'MX', |
|
305 | - 'IT' => 'IT', 'NZ' => 'NZ', 'JP' => 'JP', |
|
306 | - 'FR' => 'FR', 'GR' => 'GR', 'DE' => 'DE', |
|
307 | - 'NL' => 'NL', 'PT' => 'PT', 'ES' => 'ES' |
|
303 | + 'IE' => 'IE', 'CN' => 'CN', 'IN' => 'IN', |
|
304 | + 'AU' => 'AU', 'BR' => 'BR', 'MX' => 'MX', |
|
305 | + 'IT' => 'IT', 'NZ' => 'NZ', 'JP' => 'JP', |
|
306 | + 'FR' => 'FR', 'GR' => 'GR', 'DE' => 'DE', |
|
307 | + 'NL' => 'NL', 'PT' => 'PT', 'ES' => 'ES' |
|
308 | 308 | ), $form_id |
309 | 309 | ); |
310 | 310 | |
@@ -540,14 +540,14 @@ discard block |
||
540 | 540 | $description .= '</p>'; |
541 | 541 | |
542 | 542 | /** |
543 | - * 'yikes-mailchimp-' . $field['merge'] . '-description-html' (e.g. yikes-mailchimp-FNAME-description-html) |
|
544 | - * |
|
545 | - * Filter the description HTML block |
|
546 | - * |
|
547 | - * @param string | $description | The full HTML description block |
|
548 | - * @param string | $field['description'] | The field's description text |
|
549 | - * @param int | $form_id |
|
550 | - */ |
|
543 | + * 'yikes-mailchimp-' . $field['merge'] . '-description-html' (e.g. yikes-mailchimp-FNAME-description-html) |
|
544 | + * |
|
545 | + * Filter the description HTML block |
|
546 | + * |
|
547 | + * @param string | $description | The full HTML description block |
|
548 | + * @param string | $field['description'] | The field's description text |
|
549 | + * @param int | $form_id |
|
550 | + */ |
|
551 | 551 | $description = apply_filters( 'yikes-mailchimp-' . $field['merge'] . '-description-html', $description, esc_attr( stripslashes( $field['description'] ) ), $form_id ); |
552 | 552 | } |
553 | 553 | |
@@ -675,13 +675,13 @@ discard block |
||
675 | 675 | $required_fields = array( 'addr1' => 'address' , 'addr2' => 'address 2', 'city' => 'city', 'state' =>'state', 'zip' =>'zip' , 'country' => 'country' ); |
676 | 676 | |
677 | 677 | /** |
678 | - * Filter to control the default country (the option pre-selected in the country dropdown). |
|
679 | - * |
|
680 | - * 'yikes-mailchimp-default-country-value' |
|
681 | - * |
|
682 | - * @param string | $country_slug | The slug of the desired default country. Default: 'US' |
|
683 | - * @param int | $form_id | ID of the form |
|
684 | - */ |
|
678 | + * Filter to control the default country (the option pre-selected in the country dropdown). |
|
679 | + * |
|
680 | + * 'yikes-mailchimp-default-country-value' |
|
681 | + * |
|
682 | + * @param string | $country_slug | The slug of the desired default country. Default: 'US' |
|
683 | + * @param int | $form_id | ID of the form |
|
684 | + */ |
|
685 | 685 | $default_country = apply_filters( 'yikes-mailchimp-default-country-value', 'US', $form_id ); |
686 | 686 | |
687 | 687 | // <!-- Description Above --> |
@@ -758,15 +758,15 @@ discard block |
||
758 | 758 | <?php |
759 | 759 | $state_and_province_list = file_get_contents( YIKES_MC_PATH . 'public/partials/shortcodes/templates/state-and-province-dropdown.php' ); |
760 | 760 | /** |
761 | - * 'yikes-mailchimp-state-province-list' |
|
762 | - * |
|
763 | - * Filter the HTML options for the states dropdown |
|
764 | - * |
|
765 | - * @param string | $state_and_province_list | HTML string of state/province options |
|
766 | - * @param int | $form_id | The form ID |
|
767 | - * |
|
768 | - * @return string | $state_and_province_list | Filtered HTML string of state/province options |
|
769 | - */ |
|
761 | + * 'yikes-mailchimp-state-province-list' |
|
762 | + * |
|
763 | + * Filter the HTML options for the states dropdown |
|
764 | + * |
|
765 | + * @param string | $state_and_province_list | HTML string of state/province options |
|
766 | + * @param int | $form_id | The form ID |
|
767 | + * |
|
768 | + * @return string | $state_and_province_list | Filtered HTML string of state/province options |
|
769 | + */ |
|
770 | 770 | echo apply_filters( 'yikes-mailchimp-state-province-list', $state_and_province_list, $form_id ); |
771 | 771 | |
772 | 772 | ?> |
@@ -799,17 +799,17 @@ discard block |
||
799 | 799 | } else { |
800 | 800 | |
801 | 801 | /** |
802 | - * A filter to set the default zip code value. |
|
803 | - * |
|
804 | - * U.S. users may want to default their subscribers. |
|
805 | - * However, this filter is more for non-U.S. users, where the zip field is hidden. |
|
806 | - * Mailchimp requires a zip code (for all submissions/countries), so this filter allows users users to set a default value. |
|
807 | - * |
|
808 | - * 'yikes-mailchimp-default-zip-code' |
|
809 | - * |
|
810 | - * @param string | $zip | A value to pre-populate the zip code with. |
|
811 | - * @param int | $form_id | ID of the form |
|
812 | - */ |
|
802 | + * A filter to set the default zip code value. |
|
803 | + * |
|
804 | + * U.S. users may want to default their subscribers. |
|
805 | + * However, this filter is more for non-U.S. users, where the zip field is hidden. |
|
806 | + * Mailchimp requires a zip code (for all submissions/countries), so this filter allows users users to set a default value. |
|
807 | + * |
|
808 | + * 'yikes-mailchimp-default-zip-code' |
|
809 | + * |
|
810 | + * @param string | $zip | A value to pre-populate the zip code with. |
|
811 | + * @param int | $form_id | ID of the form |
|
812 | + */ |
|
813 | 813 | $zip_value = apply_filters( 'yikes-mailchimp-default-zip-code', '', $form_id ); |
814 | 814 | } |
815 | 815 | ?> |
@@ -1046,14 +1046,14 @@ discard block |
||
1046 | 1046 | $description .= '</p>'; |
1047 | 1047 | |
1048 | 1048 | /** |
1049 | - * 'yikes-mailchimp-' . $field['group_id'] . '-description-html' (e.g. yikes-mailchimp-0ab8f8c84b-description-html) |
|
1050 | - * |
|
1051 | - * Filter the description HTML block |
|
1052 | - * |
|
1053 | - * @param string | $description | The full HTML description block |
|
1054 | - * @param string | $field['description'] | The field's description text |
|
1055 | - * @param int | $form_id |
|
1056 | - */ |
|
1049 | + * 'yikes-mailchimp-' . $field['group_id'] . '-description-html' (e.g. yikes-mailchimp-0ab8f8c84b-description-html) |
|
1050 | + * |
|
1051 | + * Filter the description HTML block |
|
1052 | + * |
|
1053 | + * @param string | $description | The full HTML description block |
|
1054 | + * @param string | $field['description'] | The field's description text |
|
1055 | + * @param int | $form_id |
|
1056 | + */ |
|
1057 | 1057 | $description = apply_filters( 'yikes-mailchimp-' . $field['group_id'] . '-description-html', $description, esc_attr( stripslashes( $field['description'] ) ), $form_id ); |
1058 | 1058 | } |
1059 | 1059 |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | $precheck = isset( $checkbox_options[ $this->type ]['precheck'] ) && 'true' === $checkbox_options[ $this->type ]['precheck'] ? '1' : '0'; |
73 | 73 | |
74 | 74 | /** |
75 | - * Filter where the checkbox goes. |
|
76 | - * |
|
77 | - * See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ |
|
78 | - * |
|
79 | - * @param string | Which set of fields the checkbox should go into |
|
80 | - */ |
|
75 | + * Filter where the checkbox goes. |
|
76 | + * |
|
77 | + * See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ |
|
78 | + * |
|
79 | + * @param string | Which set of fields the checkbox should go into |
|
80 | + */ |
|
81 | 81 | $field_placement = apply_filters( 'yikes-mailchimp-wooco-integration-checkbox-placement', 'billing' ); |
82 | 82 | |
83 | 83 | $yikes_checkbox = array( |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | ); |
90 | 90 | |
91 | 91 | /** |
92 | - * Filter the checkbox data. |
|
93 | - * |
|
94 | - * See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ |
|
95 | - * |
|
96 | - * @param array $yikes_checkbox The checkbox's fields. |
|
97 | - * @return array $yikes_checkbox The checkbox's fields. |
|
98 | - */ |
|
92 | + * Filter the checkbox data. |
|
93 | + * |
|
94 | + * See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ |
|
95 | + * |
|
96 | + * @param array $yikes_checkbox The checkbox's fields. |
|
97 | + * @return array $yikes_checkbox The checkbox's fields. |
|
98 | + */ |
|
99 | 99 | $yikes_checkbox = apply_filters( 'yikes_mailchimp_wooco_integration_checkbox_field', $yikes_checkbox, $checkbox_options[ $this->type ] ); |
100 | 100 | |
101 | 101 | $fields[ $field_placement ][ 'yikes_mailchimp_checkbox_' . $this->type ] = $yikes_checkbox; |