@@ -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 ); |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | - * Outputs a checkbox |
|
| 31 | - */ |
|
| 30 | + * Outputs a checkbox |
|
| 31 | + */ |
|
| 32 | 32 | public function output_checkbox() { |
| 33 | 33 | if( $this->is_user_already_subscribed( $this->type ) == '1' ) { |
| 34 | 34 | return; |
@@ -184,9 +184,9 @@ discard block |
||
| 184 | 184 | * @ return array $links New array of plugin actions |
| 185 | 185 | */ |
| 186 | 186 | public function easy_forms_plugin_action_links( $links ) { |
| 187 | - $links[] = '<a href="'. esc_url( get_admin_url(null, 'admin.php?page=yikes-inc-easy-mailchimp-settings') ) .'">' . __( 'Settings', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; |
|
| 188 | - $links[] = '<a href="' . esc_url( 'http://www.yikesplugins.com?utm_source=plugins-page&utm_medium=plugin-row&utm_campaign=admin' ) . '" target="_blank">' . __( 'More plugins by YIKES' , 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; |
|
| 189 | - return $links; |
|
| 187 | + $links[] = '<a href="'. esc_url( get_admin_url(null, 'admin.php?page=yikes-inc-easy-mailchimp-settings') ) .'">' . __( 'Settings', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; |
|
| 188 | + $links[] = '<a href="' . esc_url( 'http://www.yikesplugins.com?utm_source=plugins-page&utm_medium=plugin-row&utm_campaign=admin' ) . '" target="_blank">' . __( 'More plugins by YIKES' , 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; |
|
| 189 | + return $links; |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | /** |
@@ -419,10 +419,10 @@ discard block |
||
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | /** |
| 422 | - * Dismiss the migrate options notice (incase the user wants to do things manually) |
|
| 423 | - * |
|
| 424 | - * @since 6.0.0 |
|
| 425 | - **/ |
|
| 422 | + * Dismiss the migrate options notice (incase the user wants to do things manually) |
|
| 423 | + * |
|
| 424 | + * @since 6.0.0 |
|
| 425 | + **/ |
|
| 426 | 426 | public function yikes_easy_mailchimp_dismiss_option_migrate() { |
| 427 | 427 | // delete the options and allow the user to manually updadte things |
| 428 | 428 | |
@@ -560,10 +560,10 @@ discard block |
||
| 560 | 560 | } |
| 561 | 561 | |
| 562 | 562 | /** |
| 563 | - * Localize Script |
|
| 564 | - * Pass our imported list data, to the JS file |
|
| 565 | - * to build the drop down list in the modal |
|
| 566 | - */ |
|
| 563 | + * Localize Script |
|
| 564 | + * Pass our imported list data, to the JS file |
|
| 565 | + * to build the drop down list in the modal |
|
| 566 | + */ |
|
| 567 | 567 | public function tinymce_yikes_easy_mc() { |
| 568 | 568 | // check capabilities |
| 569 | 569 | if( ! current_user_can( apply_filters( 'yikes-mailchimp-user-role-access' , 'manage_options' ) ) ) { |
@@ -727,9 +727,9 @@ discard block |
||
| 727 | 727 | |
| 728 | 728 | |
| 729 | 729 | /** |
| 730 | - * Localization functions for jQuery ui datepicker |
|
| 731 | - * @since 6.0.3.8 |
|
| 732 | - */ |
|
| 730 | + * Localization functions for jQuery ui datepicker |
|
| 731 | + * @since 6.0.3.8 |
|
| 732 | + */ |
|
| 733 | 733 | /** |
| 734 | 734 | * Format array for the datepicker |
| 735 | 735 | * WordPress stores the locale information in an array with a alphanumeric index, and |
@@ -788,13 +788,13 @@ discard block |
||
| 788 | 788 | } |
| 789 | 789 | } |
| 790 | 790 | /** |
| 791 | - * end Localization functions for jQuery ui datepicker |
|
| 792 | - */ |
|
| 791 | + * end Localization functions for jQuery ui datepicker |
|
| 792 | + */ |
|
| 793 | 793 | |
| 794 | 794 | /** |
| 795 | - * Register our admin pages |
|
| 796 | - * used to display data back to the user |
|
| 797 | - **/ |
|
| 795 | + * Register our admin pages |
|
| 796 | + * used to display data back to the user |
|
| 797 | + **/ |
|
| 798 | 798 | public function register_admin_pages() { |
| 799 | 799 | |
| 800 | 800 | /* Top Level Menu 'Easy MailChimp' */ |
@@ -948,82 +948,82 @@ discard block |
||
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | /** |
| 951 | - * Generate YIKES Inc. Easy MailChimp Manage Forms Page |
|
| 952 | - * |
|
| 953 | - * @since 1.0.0 |
|
| 954 | - */ |
|
| 951 | + * Generate YIKES Inc. Easy MailChimp Manage Forms Page |
|
| 952 | + * |
|
| 953 | + * @since 1.0.0 |
|
| 954 | + */ |
|
| 955 | 955 | function generateManageFormsPage() { |
| 956 | 956 | require_once YIKES_MC_PATH . 'admin/partials/menu/manage-forms.php'; // include our manage forms page |
| 957 | 957 | } |
| 958 | 958 | |
| 959 | 959 | /** |
| 960 | - * Generate YIKES Inc. Easy MailChimp Manage Lists Page |
|
| 961 | - * |
|
| 962 | - * @since 1.0.0 |
|
| 963 | - */ |
|
| 960 | + * Generate YIKES Inc. Easy MailChimp Manage Lists Page |
|
| 961 | + * |
|
| 962 | + * @since 1.0.0 |
|
| 963 | + */ |
|
| 964 | 964 | function generateManageListsPage() { |
| 965 | 965 | require_once YIKES_MC_PATH . 'admin/partials/menu/manage-lists.php'; // include our lists page |
| 966 | 966 | } |
| 967 | 967 | |
| 968 | 968 | /** |
| 969 | - * Generate YIKES Inc. Easy MailChimp Account Details Page |
|
| 970 | - * |
|
| 971 | - * @since 1.0.0 |
|
| 972 | - */ |
|
| 969 | + * Generate YIKES Inc. Easy MailChimp Account Details Page |
|
| 970 | + * |
|
| 971 | + * @since 1.0.0 |
|
| 972 | + */ |
|
| 973 | 973 | function generateAccountDetailsPage() { |
| 974 | 974 | require_once YIKES_MC_PATH . 'admin/partials/menu/account-details.php'; // include our account details page |
| 975 | 975 | } |
| 976 | 976 | |
| 977 | 977 | /** |
| 978 | - * Generate YIKES Inc. Easy MailChimp Support Page |
|
| 979 | - * |
|
| 980 | - * @since 1.0.0 |
|
| 981 | - */ |
|
| 978 | + * Generate YIKES Inc. Easy MailChimp Support Page |
|
| 979 | + * |
|
| 980 | + * @since 1.0.0 |
|
| 981 | + */ |
|
| 982 | 982 | function generateSupportPage() { |
| 983 | 983 | require_once YIKES_MC_PATH . 'admin/partials/menu/support.php'; // include our options page |
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | /** |
| 987 | - * Generate YIKES Inc. Easy MailChimp Edit Form Page |
|
| 988 | - * |
|
| 989 | - * @since 1.0.0 |
|
| 990 | - */ |
|
| 987 | + * Generate YIKES Inc. Easy MailChimp Edit Form Page |
|
| 988 | + * |
|
| 989 | + * @since 1.0.0 |
|
| 990 | + */ |
|
| 991 | 991 | function generateEditFormPage() { |
| 992 | 992 | require_once YIKES_MC_PATH . 'admin/partials/edit-form.php'; // include our options page |
| 993 | 993 | } |
| 994 | 994 | |
| 995 | 995 | /** |
| 996 | - * Generate YIKES Inc. Easy MailChimp Welcome Page |
|
| 997 | - * |
|
| 998 | - * @since 1.0.0 |
|
| 999 | - */ |
|
| 996 | + * Generate YIKES Inc. Easy MailChimp Welcome Page |
|
| 997 | + * |
|
| 998 | + * @since 1.0.0 |
|
| 999 | + */ |
|
| 1000 | 1000 | function generateWelcomePage() { |
| 1001 | 1001 | require_once YIKES_MC_PATH . 'admin/partials/welcome-page/welcome.php'; // include our options page |
| 1002 | 1002 | } |
| 1003 | 1003 | |
| 1004 | 1004 | /** |
| 1005 | - * Generate YIKES Inc. Easy MailChimp View List Page |
|
| 1006 | - * |
|
| 1007 | - * @since 1.0.0 |
|
| 1008 | - */ |
|
| 1005 | + * Generate YIKES Inc. Easy MailChimp View List Page |
|
| 1006 | + * |
|
| 1007 | + * @since 1.0.0 |
|
| 1008 | + */ |
|
| 1009 | 1009 | function generateViewListPage() { |
| 1010 | 1010 | require_once YIKES_MC_PATH . 'admin/partials/view-list.php'; // include our options page |
| 1011 | 1011 | } |
| 1012 | 1012 | |
| 1013 | 1013 | /** |
| 1014 | - * Generate YIKES Inc. Easy MailChimp View User Page |
|
| 1015 | - * |
|
| 1016 | - * @since 1.0.0 |
|
| 1017 | - */ |
|
| 1014 | + * Generate YIKES Inc. Easy MailChimp View User Page |
|
| 1015 | + * |
|
| 1016 | + * @since 1.0.0 |
|
| 1017 | + */ |
|
| 1018 | 1018 | function generateViewUserPage() { |
| 1019 | 1019 | require_once YIKES_MC_PATH . 'admin/partials/view-user.php'; // include our options page |
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | 1022 | /** |
| 1023 | - * Register our plugin settings, and display them on our settings page |
|
| 1024 | - * |
|
| 1025 | - * @since v.5.4 |
|
| 1026 | - **/ |
|
| 1023 | + * Register our plugin settings, and display them on our settings page |
|
| 1024 | + * |
|
| 1025 | + * @since v.5.4 |
|
| 1026 | + **/ |
|
| 1027 | 1027 | function yikes_easy_mc_settings_init() { |
| 1028 | 1028 | |
| 1029 | 1029 | /* Register General Settings Section */ |
@@ -1139,9 +1139,9 @@ discard block |
||
| 1139 | 1139 | } |
| 1140 | 1140 | |
| 1141 | 1141 | /** |
| 1142 | - * Options Sanitization & Validation |
|
| 1143 | - * @since complete re-write |
|
| 1144 | - **/ |
|
| 1142 | + * Options Sanitization & Validation |
|
| 1143 | + * @since complete re-write |
|
| 1144 | + **/ |
|
| 1145 | 1145 | function yikes_mc_validate_api_key( $input ) { |
| 1146 | 1146 | if( $input == '' ) { |
| 1147 | 1147 | return; |
@@ -1180,20 +1180,20 @@ discard block |
||
| 1180 | 1180 | } |
| 1181 | 1181 | |
| 1182 | 1182 | /** |
| 1183 | - * Generate YIKES Inc. Easy Forms for MailChimp Options Page |
|
| 1184 | - * |
|
| 1185 | - * @since 1.0.0 |
|
| 1186 | - */ |
|
| 1183 | + * Generate YIKES Inc. Easy Forms for MailChimp Options Page |
|
| 1184 | + * |
|
| 1185 | + * @since 1.0.0 |
|
| 1186 | + */ |
|
| 1187 | 1187 | function generatePageOptions() { |
| 1188 | 1188 | require_once YIKES_MC_PATH . 'admin/partials/menu/options.php'; // include our options page |
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | 1191 | /** |
| 1192 | - * Check if users API key is valid, if not |
|
| 1193 | - * this function will apply a disabled attribute |
|
| 1194 | - * to form fields. (input, dropdowns, buttons etc.) |
|
| 1195 | - * @since v5.5 re-write |
|
| 1196 | - **/ |
|
| 1192 | + * Check if users API key is valid, if not |
|
| 1193 | + * this function will apply a disabled attribute |
|
| 1194 | + * to form fields. (input, dropdowns, buttons etc.) |
|
| 1195 | + * @since v5.5 re-write |
|
| 1196 | + **/ |
|
| 1197 | 1197 | public function is_user_mc_api_valid_form( $echo=true ) { |
| 1198 | 1198 | if( $echo == true ) { |
| 1199 | 1199 | if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) { |
@@ -1233,7 +1233,7 @@ discard block |
||
| 1233 | 1233 | * Migrate our old options , to the new options API |
| 1234 | 1234 | * moving from 5.5 and beyond.. |
| 1235 | 1235 | * @since |
| 1236 | - */ |
|
| 1236 | + */ |
|
| 1237 | 1237 | public function migrate_old_yks_mc_options() { |
| 1238 | 1238 | // include our migrate options helper file |
| 1239 | 1239 | include_once YIKES_MC_PATH . 'admin/partials/upgrade-helpers/upgrade-migrate-options.php'; |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | /** |
| 1243 | 1243 | Admin Notices |
| 1244 | 1244 | - Notifications displayed at the top of admin pages, back to the user |
| 1245 | - **/ |
|
| 1245 | + **/ |
|
| 1246 | 1246 | |
| 1247 | 1247 | /** |
| 1248 | 1248 | * Check for existing plugin options |
@@ -1301,12 +1301,12 @@ discard block |
||
| 1301 | 1301 | * - http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search |
| 1302 | 1302 | */ |
| 1303 | 1303 | function findMCListID($id, $array) { |
| 1304 | - foreach ($array as $key => $val) { |
|
| 1305 | - if ($val['id'] === $id) { |
|
| 1306 | - return $key; |
|
| 1307 | - } |
|
| 1308 | - } |
|
| 1309 | - return null; |
|
| 1304 | + foreach ($array as $key => $val) { |
|
| 1305 | + if ($val['id'] === $id) { |
|
| 1306 | + return $key; |
|
| 1307 | + } |
|
| 1308 | + } |
|
| 1309 | + return null; |
|
| 1310 | 1310 | } // end |
| 1311 | 1311 | |
| 1312 | 1312 | /* Ajax Migrate Options */ |
@@ -1643,9 +1643,9 @@ discard block |
||
| 1643 | 1643 | } |
| 1644 | 1644 | |
| 1645 | 1645 | /** |
| 1646 | - * Custom action hook for our extensions to hook into |
|
| 1647 | - * @parameter get_current_screen() current screen information |
|
| 1648 | - */ |
|
| 1646 | + * Custom action hook for our extensions to hook into |
|
| 1647 | + * @parameter get_current_screen() current screen information |
|
| 1648 | + */ |
|
| 1649 | 1649 | do_action( 'yikes-mailchimp-admin-sidebar', get_current_screen() ); |
| 1650 | 1650 | |
| 1651 | 1651 | } |
@@ -2795,12 +2795,12 @@ discard block |
||
| 2795 | 2795 | } |
| 2796 | 2796 | |
| 2797 | 2797 | /** |
| 2798 | - * Return an array of MailChimp lists associated with this account |
|
| 2799 | - * |
|
| 2800 | - * Used when deleting the sites MailChimp cache stored |
|
| 2801 | - * @since 6.0.2 |
|
| 2802 | - * @return $list_id_array - array of list id's to loop over |
|
| 2803 | - */ |
|
| 2798 | + * Return an array of MailChimp lists associated with this account |
|
| 2799 | + * |
|
| 2800 | + * Used when deleting the sites MailChimp cache stored |
|
| 2801 | + * @since 6.0.2 |
|
| 2802 | + * @return $list_id_array - array of list id's to loop over |
|
| 2803 | + */ |
|
| 2804 | 2804 | public function get_mailchimp_list_ids_on_account() { |
| 2805 | 2805 | $api_key = trim( get_option( 'yikes-mc-api-key' , '' ) ); |
| 2806 | 2806 | if( ! $api_key ) { |
@@ -2910,18 +2910,18 @@ discard block |
||
| 2910 | 2910 | } |
| 2911 | 2911 | |
| 2912 | 2912 | /** |
| 2913 | - * Hook in and display our support page/knowledge base articles |
|
| 2914 | - * on the support page |
|
| 2915 | - * @since 6.0.3.8 |
|
| 2916 | - */ |
|
| 2913 | + * Hook in and display our support page/knowledge base articles |
|
| 2914 | + * on the support page |
|
| 2915 | + * @since 6.0.3.8 |
|
| 2916 | + */ |
|
| 2917 | 2917 | public function hook_and_display_kb_article_RSS() { |
| 2918 | 2918 | include_once( YIKES_MC_PATH . 'admin/partials/helpers/knowledge-base-articles-RSS.php' ); |
| 2919 | 2919 | } |
| 2920 | 2920 | |
| 2921 | 2921 | /** |
| 2922 | - * Check the users version number, and display a notice to upgrade the databse if needed |
|
| 2923 | - * @since 6.0.4 |
|
| 2924 | - */ |
|
| 2922 | + * Check the users version number, and display a notice to upgrade the databse if needed |
|
| 2923 | + * @since 6.0.4 |
|
| 2924 | + */ |
|
| 2925 | 2925 | public function check_yikes_mc_table_version() { |
| 2926 | 2926 | if( get_option( 'yikes_mc_database_version', '0.00' ) < '1.0' ) { |
| 2927 | 2927 | require_once YIKES_MC_PATH . 'includes/class-yikes-inc-easy-mailchimp-extender-activator.php'; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | // Process our form submissions (non ajax forms) |
| 19 | 19 | if ( ! isset( $_POST['yikes_easy_mc_new_subscriber'] ) || ! wp_verify_nonce( $_POST['yikes_easy_mc_new_subscriber'], 'yikes_easy_mc_form_submit' ) ) { |
| 20 | 20 | |
| 21 | - $process_submission_response = '<p><small class="form_submission_error">' . __( "Error : Sorry, the nonce security check didn't pass. Please reload the page and try again. You may want to try clearing your browser cache as a last attempt." , 'yikes-inc-easy-mailchimp-extender' ) . '</small></p>'; |
|
| 21 | + $process_submission_response = '<p><small class="form_submission_error">' . __( "Error : Sorry, the nonce security check didn't pass. Please reload the page and try again. You may want to try clearing your browser cache as a last attempt." , 'yikes-inc-easy-mailchimp-extender' ) . '</small></p>'; |
|
| 22 | 22 | return; |
| 23 | 23 | |
| 24 | 24 | } else { |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | $merge_variables = apply_filters( 'yikes-mailchimp-before-submission-' . $form_id, $merge_variables ); |
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | - * Action hooks fired before API request |
|
| 128 | - * @since 6.0.5.5 |
|
| 129 | - * @param $merge_variables array Array of merge variable to use |
|
| 130 | - * @param $form_id integer The form ID to target (eg: 1, 2 etc.) |
|
| 131 | - */ |
|
| 127 | + * Action hooks fired before API request |
|
| 128 | + * @since 6.0.5.5 |
|
| 129 | + * @param $merge_variables array Array of merge variable to use |
|
| 130 | + * @param $form_id integer The form ID to target (eg: 1, 2 etc.) |
|
| 131 | + */ |
|
| 132 | 132 | do_action( 'yikes-mailchimp-before-submission', $merge_variables ); |
| 133 | 133 | do_action( 'yikes-mailchimp-before-submission-' . $form_id, $merge_variables ); |
| 134 | 134 | |
@@ -102,10 +102,10 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | - * Get the checkbox for the given integration and render it on the front end |
|
| 106 | - * @return string |
|
| 107 | - * @since 6.0.0 |
|
| 108 | - */ |
|
| 105 | + * Get the checkbox for the given integration and render it on the front end |
|
| 106 | + * @return string |
|
| 107 | + * @since 6.0.0 |
|
| 108 | + */ |
|
| 109 | 109 | public function yikes_get_checkbox() { |
| 110 | 110 | // enqueue our checkbox styles whenever the checkbox is displayed |
| 111 | 111 | wp_enqueue_style( 'yikes-easy-mailchimp-checkbox-integration-styles', plugin_dir_url( __FILE__ ) . '../css/yikes-inc-easy-mailchimp-checkbox-integration.min.css' ); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * a new integration type is submitted |
| 136 | 136 | * |
| 137 | 137 | * @since 6.0.0 |
| 138 | - **/ |
|
| 138 | + **/ |
|
| 139 | 139 | public function subscribe_user_integration( $email, $type, $merge_vars ) { |
| 140 | 140 | // get checkbox data |
| 141 | 141 | $checkbox_options = get_option( 'optin-checkbox-init' , '' ); |
@@ -198,9 +198,9 @@ discard block |
||
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
| 201 | - * Build merge varaibles array |
|
| 202 | - * @since 6.0.0 |
|
| 203 | - */ |
|
| 201 | + * Build merge varaibles array |
|
| 202 | + * @since 6.0.0 |
|
| 203 | + */ |
|
| 204 | 204 | public function user_merge_vars( WP_User $user ) { |
| 205 | 205 | // start with user_login as name, since that's always known |
| 206 | 206 | $merge_vars = array( |
@@ -240,10 +240,10 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | - * Alter the registraton complete message |
|
| 244 | - * if the registration form checkbox integration is toggled on |
|
| 245 | - * @since 6.0.0 |
|
| 246 | - **/ |
|
| 243 | + * Alter the registraton complete message |
|
| 244 | + * if the registration form checkbox integration is toggled on |
|
| 245 | + * @since 6.0.0 |
|
| 246 | + **/ |
|
| 247 | 247 | public function yikes_reg_complete_msg( $errors, $redirect_to ) { |
| 248 | 248 | if( isset( $errors->errors['registered'] ) ) { |
| 249 | 249 | $email_error = get_option( 'yikes_register_subscription_error' , '' ); |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | unset( $tmp ); |
| 263 | 263 | delete_option( 'yikes_register_subscription_error' ); |
| 264 | 264 | } |
| 265 | - } |
|
| 266 | - return $errors; |
|
| 265 | + } |
|
| 266 | + return $errors; |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | } |