@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | if ( $network_wide ) { |
36 | 36 | $old_blog = $wpdb->blogid; |
37 | 37 | // Get all blog ids |
38 | - $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); |
|
38 | + $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); |
|
39 | 39 | foreach ( $blogids as $blog_id ) { |
40 | 40 | switch_to_blog( $blog_id ); |
41 | 41 | self::_activate_yikes_easy_mailchimp( $wpdb ); |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | custom_fields LONGTEXT NOT NULL, |
92 | 92 | UNIQUE KEY id (id) |
93 | 93 | ) $charset_collate;"; |
94 | - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
95 | - dbDelta($sql); |
|
94 | + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
95 | + dbDelta( $sql ); |
|
96 | 96 | |
97 | 97 | // create an option for the date that the user initially activated the plugin |
98 | 98 | // used to display a two week notice, asking for a review or to upgrade |
99 | - if( !get_option( 'yikes_easy_mailchimp_activation_date' ) || get_option( 'yikes_easy_mailchimp_activation_date' ) == '' ) { |
|
100 | - update_option( 'yikes_easy_mailchimp_activation_date' , strtotime( 'now' ) ); |
|
99 | + if ( ! get_option( 'yikes_easy_mailchimp_activation_date' ) || get_option( 'yikes_easy_mailchimp_activation_date' ) == '' ) { |
|
100 | + update_option( 'yikes_easy_mailchimp_activation_date', strtotime( 'now' ) ); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | } |
@@ -45,7 +45,8 @@ |
||
45 | 45 | return; |
46 | 46 | } |
47 | 47 | self::_activate_yikes_easy_mailchimp( $wpdb ); |
48 | - } else { /* end network activate */ |
|
48 | + } else { |
|
49 | +/* end network activate */ |
|
49 | 50 | self::_activate_yikes_easy_mailchimp( $wpdb ); |
50 | 51 | } |
51 | 52 | } |
@@ -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 ); |
@@ -95,13 +95,13 @@ |
||
95 | 95 | global $wpdb; |
96 | 96 | $list_data = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A ); |
97 | 97 | $lists = array(); |
98 | - if( !empty( $list_data ) ) { |
|
98 | + if ( ! empty( $list_data ) ) { |
|
99 | 99 | // build an array to pass to our javascript |
100 | - foreach( $list_data as $form ) { |
|
101 | - $lists[$form['form_name']] = $form['id']; |
|
100 | + foreach ( $list_data as $form ) { |
|
101 | + $lists[ $form[ 'form_name' ] ] = $form[ 'id' ]; |
|
102 | 102 | } |
103 | 103 | } else { |
104 | - $lists[__( 'Please Import Some MailChimp Lists' , 'yikes-inc-easy-mailchimp-extender' )] = '-'; |
|
104 | + $lists[ __( 'Please Import Some MailChimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-'; |
|
105 | 105 | } |
106 | 106 | return $lists; |
107 | 107 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | global $wpdb; |
96 | 96 | $list_data = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A ); |
97 | 97 | $lists = array(); |
98 | - if( !empty( $list_data ) ) { |
|
98 | + if( !empty( $list_data ) ) { |
|
99 | 99 | // build an array to pass to our javascript |
100 | 100 | foreach( $list_data as $form ) { |
101 | 101 | $lists[$form['form_name']] = $form['id']; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | // required..* |
18 | 18 | include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
19 | 19 | /* Visual Composer */ |
20 | - if( is_plugin_active( 'js_composer/js_composer.php' ) ) { |
|
20 | + if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { |
|
21 | 21 | include_once( YIKES_MC_PATH . 'includes/third-party-integrations/visual-composer/visual-composer.php' ); |
22 | 22 | } |
23 | 23 | } |
@@ -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 |
@@ -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>YIKES 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>YIKES 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 a list of add-ons available for YIKES Easy Forms for MailChimp. Each add-on extends the base 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 a list of add-ons available for YIKES Easy Forms for MailChimp. Each add-on extends the base functionality of the free plugin.", 'yikes-inc-easy-mailchimp-extender' ); ?></p> |
|
16 | 16 | |
17 | 17 | <!-- Add-On Container --> |
18 | 18 | <section id="add-ons"> |
@@ -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 |
@@ -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 |