@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | |
25 | 25 | |
26 | 26 | /** |
27 | - * Outputs a checkbox, if user is not already subscribed |
|
28 | - */ |
|
27 | + * Outputs a checkbox, if user is not already subscribed |
|
28 | + */ |
|
29 | 29 | public function output_checkbox( $comment_field ) { |
30 | 30 | if( $this->is_user_already_subscribed( $this->type ) == '1' ) { |
31 | 31 | return $comment_field; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * a new comment is submitted |
41 | 41 | * |
42 | 42 | * @since 6.0.0 |
43 | - **/ |
|
43 | + **/ |
|
44 | 44 | public function subscribe_from_comment( $comment_id , $comment_approved ) { |
45 | 45 | // was sign-up checkbox checked? |
46 | 46 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |
@@ -18,8 +18,8 @@ |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
21 | - * Outputs a checkbox, if user is not already subscribed |
|
22 | - */ |
|
21 | + * Outputs a checkbox, if user is not already subscribed |
|
22 | + */ |
|
23 | 23 | public function output_checkbox() { |
24 | 24 | if( $this->is_user_already_subscribed( $this->type ) == '1' ) { |
25 | 25 | return; |
@@ -65,17 +65,17 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | - * @param int $order_id |
|
69 | - */ |
|
68 | + * @param int $order_id |
|
69 | + */ |
|
70 | 70 | public function save_woocommerce_checkout_checkbox_value( $order_id ) { |
71 | 71 | // update the order post meta |
72 | 72 | update_post_meta( $order_id, 'yikes_easy_mailchimp_optin', $this->was_checkbox_checked( $this->type ) ); |
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @param int $order_id |
|
77 | - * @return boolean |
|
78 | - */ |
|
76 | + * @param int $order_id |
|
77 | + * @return boolean |
|
78 | + */ |
|
79 | 79 | public function subscribe_from_woocommerce_checkout( $order_id ) { |
80 | 80 | $do_optin = get_post_meta( $order_id, 'yikes_easy_mailchimp_optin', true ); |
81 | 81 | if( $do_optin == '1' ) { |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | - * Outputs a checkbox |
|
28 | - */ |
|
27 | + * Outputs a checkbox |
|
28 | + */ |
|
29 | 29 | public function output_checkbox() { |
30 | 30 | echo $this->yikes_get_checkbox(); |
31 | 31 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param int $user_id |
37 | 37 | * |
38 | 38 | * @return bool|string |
39 | - */ |
|
39 | + */ |
|
40 | 40 | public function subscribe_from_registration( $user_id ) { |
41 | 41 | // was sign-up checkbox checked? |
42 | 42 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
33 | - * Registers the CF7 shortcode |
|
33 | + * Registers the CF7 shortcode |
|
34 | 34 | * |
35 | - * @return boolean |
|
36 | - */ |
|
35 | + * @return boolean |
|
36 | + */ |
|
37 | 37 | public function init() { |
38 | 38 | if( ! function_exists( 'wpcf7_add_shortcode' ) ) { |
39 | 39 | return false; |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * Alter Contact Form 7 data. |
|
47 | - * |
|
48 | - * Adds yikes_mailchimp_checkbox to post data so users can use `yikes_mailchimp_checkbox` in their email templates |
|
49 | - * |
|
50 | - * @param array $data |
|
51 | - * @return array |
|
52 | - */ |
|
46 | + * Alter Contact Form 7 data. |
|
47 | + * |
|
48 | + * Adds yikes_mailchimp_checkbox to post data so users can use `yikes_mailchimp_checkbox` in their email templates |
|
49 | + * |
|
50 | + * @param array $data |
|
51 | + * @return array |
|
52 | + */ |
|
53 | 53 | public function alter_cf7_data( $data = array() ) { |
54 | 54 | $data['yikes_mailchimp_checkbox'] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' ); |
55 | 55 | return $data; |
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * Subscribe from Contact Form 7 Forms |
|
60 | - */ |
|
59 | + * Subscribe from Contact Form 7 Forms |
|
60 | + */ |
|
61 | 61 | public function new_cf7_subscription( $contact_form ) { |
62 | 62 | // was sign-up checkbox checked? |
63 | 63 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * Create our own custom the_content(); filter to prevent plugins and such from hooking in where not wanted |
|
77 | - * |
|
78 | - * @since 6.0.3 |
|
79 | - */ |
|
76 | + * Create our own custom the_content(); filter to prevent plugins and such from hooking in where not wanted |
|
77 | + * |
|
78 | + * @since 6.0.3 |
|
79 | + */ |
|
80 | 80 | public function yikes_custom_frontend_content_filter() { |
81 | 81 | add_filter( 'yikes-mailchimp-frontend-content', 'wptexturize' ); |
82 | 82 | add_filter( 'yikes-mailchimp-frontend-content', 'convert_smilies' ); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * load our checkbox classes |
94 | 94 | * |
95 | 95 | * @since 6.0.0 |
96 | - **/ |
|
96 | + **/ |
|
97 | 97 | public function load_checkbox_integration_classes() { |
98 | 98 | // store our options |
99 | 99 | $integrations = get_option( 'optin-checkbox-init' , '' ); |
@@ -48,9 +48,9 @@ |
||
48 | 48 | $first = false; |
49 | 49 | } |
50 | 50 | |
51 | - $leadArray = (array) $row; // Cast the Object to an array |
|
52 | - // Add row to file |
|
53 | - fputcsv( $output_handle, $leadArray ); |
|
51 | + $leadArray = (array) $row; // Cast the Object to an array |
|
52 | + // Add row to file |
|
53 | + fputcsv( $output_handle, $leadArray ); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // Close output file stream |
@@ -6,26 +6,26 @@ discard block |
||
6 | 6 | class YIKES_MailChimp_Visual_Composer_Extension { |
7 | 7 | |
8 | 8 | /** |
9 | - * Constructor |
|
10 | - * @since 6.0.3 |
|
11 | - */ |
|
9 | + * Constructor |
|
10 | + * @since 6.0.3 |
|
11 | + */ |
|
12 | 12 | function __construct() { |
13 | 13 | add_action( 'admin_init', array( $this, 'extend_visual_composer' ) ); |
14 | 14 | add_shortcode_param( 'yikes_mailchimp_logo', array( $this, 'yikes_mailchimp_logo_vc_section' ) ); |
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
18 | - * Extend Visual Composer with custom button |
|
19 | - * @since 6.0.3 |
|
20 | - */ |
|
18 | + * Extend Visual Composer with custom button |
|
19 | + * @since 6.0.3 |
|
20 | + */ |
|
21 | 21 | public function extend_visual_composer() { |
22 | 22 | vc_map( array( |
23 | - "name" => __( "Easy Forms for MailChimp", "yikes-inc-easy-mailchimp-extender" ), |
|
24 | - "base" => "yikes-mailchimp", |
|
25 | - "icon" => YIKES_MC_URL . "includes/images/Welcome_Page/yikes-mailchimp-welcome-logo.png", // Simply pass url to your icon here |
|
26 | - "category" => 'Content', // where is this buutton being displayed |
|
27 | - "description" => __( "Display a MailChimp Opt-In form", "yikes-inc-easy-mailchimp-extender" ), // add a description |
|
28 | - "params" => array( |
|
23 | + "name" => __( "Easy Forms for MailChimp", "yikes-inc-easy-mailchimp-extender" ), |
|
24 | + "base" => "yikes-mailchimp", |
|
25 | + "icon" => YIKES_MC_URL . "includes/images/Welcome_Page/yikes-mailchimp-welcome-logo.png", // Simply pass url to your icon here |
|
26 | + "category" => 'Content', // where is this buutton being displayed |
|
27 | + "description" => __( "Display a MailChimp Opt-In form", "yikes-inc-easy-mailchimp-extender" ), // add a description |
|
28 | + "params" => array( |
|
29 | 29 | array( |
30 | 30 | "type" => "yikes_mailchimp_logo", |
31 | 31 | "holder" => "div", |
@@ -75,22 +75,22 @@ discard block |
||
75 | 75 | "value" => __( "Submit", "yikes-inc-easy-mailchimp-extender" ), |
76 | 76 | "description" => __( "Enter a title to display", "yikes-inc-easy-mailchimp-extender" ) |
77 | 77 | ) |
78 | - ) |
|
78 | + ) |
|
79 | 79 | ) ); |
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | - * Custom Callback Section |
|
84 | - * @since 6.0.3 |
|
85 | - */ |
|
83 | + * Custom Callback Section |
|
84 | + * @since 6.0.3 |
|
85 | + */ |
|
86 | 86 | public function yikes_mailchimp_logo_vc_section( $settings, $value ) { |
87 | 87 | return '<img style="width:250px;display:block;margin:0 auto;" src="' . YIKES_MC_URL . 'includes/images/Welcome_Page/mailchimp-logo.png" title="' . __( 'Easy Forms for MailChimp by YIKES', 'yikes-inc-easy-mailchimp-extender' ) . '" />'; |
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | - * Retreive a list of forms created by the user that they can select from in the dropdown |
|
92 | - * @since 6.0.3 |
|
93 | - */ |
|
91 | + * Retreive a list of forms created by the user that they can select from in the dropdown |
|
92 | + * @since 6.0.3 |
|
93 | + */ |
|
94 | 94 | public function yikes_mailchimp_retreive_user_created_forms() { |
95 | 95 | global $wpdb; |
96 | 96 | $list_data = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A ); |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Options page for storing our reCAPTCHA options |
|
4 | - * |
|
5 | - * Page template that houses our reCAPTCHA API keys. |
|
6 | - * |
|
7 | - * @since 6.0.0 |
|
8 | - * |
|
9 | - * @package WordPress |
|
10 | - * @subpackage Component |
|
3 | + * Options page for storing our reCAPTCHA options |
|
4 | + * |
|
5 | + * Page template that houses our reCAPTCHA API keys. |
|
6 | + * |
|
7 | + * @since 6.0.0 |
|
8 | + * |
|
9 | + * @package WordPress |
|
10 | + * @subpackage Component |
|
11 | 11 | */ |
12 | 12 | |
13 | 13 | ?> |