@@ -510,10 +510,10 @@ discard block |
||
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | /** |
| 513 | - * Dismiss the migrate options notice (incase the user wants to do things manually) |
|
| 514 | - * |
|
| 515 | - * @since 6.0.0 |
|
| 516 | - **/ |
|
| 513 | + * Dismiss the migrate options notice (incase the user wants to do things manually) |
|
| 514 | + * |
|
| 515 | + * @since 6.0.0 |
|
| 516 | + **/ |
|
| 517 | 517 | public function yikes_easy_mailchimp_dismiss_option_migrate() {
|
| 518 | 518 | // delete the options and allow the user to manually update things. |
| 519 | 519 | |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | yikes_easy_mailchimp_stop_bugging_me() |
| 619 | 619 | Remove the Review us notification when user clicks 'Dismiss' |
| 620 | 620 | @since v3.1.1 |
| 621 | - */ |
|
| 621 | + */ |
|
| 622 | 622 | public function yikes_easy_mailchimp_stop_bugging_me() {
|
| 623 | 623 | if ( isset( $_GET['yikes_easy_mc_icons_nobug'] ) && (int) filter_var( $_GET['yikes_easy_mc_icons_nobug'], FILTER_SANITIZE_NUMBER_INT ) === 1 ) {
|
| 624 | 624 | add_option( 'yikes_easy_mailchimp_review_stop_bugging_me', true ); |
@@ -885,9 +885,9 @@ discard block |
||
| 885 | 885 | } |
| 886 | 886 | |
| 887 | 887 | /** |
| 888 | - * Register our admin pages |
|
| 889 | - * used to display data back to the user |
|
| 890 | - **/ |
|
| 888 | + * Register our admin pages |
|
| 889 | + * used to display data back to the user |
|
| 890 | + **/ |
|
| 891 | 891 | public function register_admin_pages() {
|
| 892 | 892 | |
| 893 | 893 | /* Top Level Menu 'Easy MailChimp' */ |
@@ -1016,28 +1016,28 @@ discard block |
||
| 1016 | 1016 | } |
| 1017 | 1017 | |
| 1018 | 1018 | /** |
| 1019 | - * Generate Us Easy MailChimp Manage Forms Page |
|
| 1020 | - * |
|
| 1021 | - * @since 1.0.0 |
|
| 1022 | - */ |
|
| 1019 | + * Generate Us Easy MailChimp Manage Forms Page |
|
| 1020 | + * |
|
| 1021 | + * @since 1.0.0 |
|
| 1022 | + */ |
|
| 1023 | 1023 | function generateManageFormsPage() {
|
| 1024 | 1024 | require_once YIKES_MC_PATH . 'admin/partials/menu/manage-forms.php'; // include our manage forms page |
| 1025 | 1025 | } |
| 1026 | 1026 | |
| 1027 | 1027 | /** |
| 1028 | - * Generate Us Easy MailChimp Manage Lists Page |
|
| 1029 | - * |
|
| 1030 | - * @since 1.0.0 |
|
| 1031 | - */ |
|
| 1028 | + * Generate Us Easy MailChimp Manage Lists Page |
|
| 1029 | + * |
|
| 1030 | + * @since 1.0.0 |
|
| 1031 | + */ |
|
| 1032 | 1032 | function generateManageListsPage() {
|
| 1033 | 1033 | require_once YIKES_MC_PATH . 'admin/partials/menu/manage-lists.php'; // include our lists page |
| 1034 | 1034 | } |
| 1035 | 1035 | |
| 1036 | 1036 | /** |
| 1037 | - * Generate Us Easy MailChimp Support Page |
|
| 1038 | - * |
|
| 1039 | - * @since 1.0.0 |
|
| 1040 | - */ |
|
| 1037 | + * Generate Us Easy MailChimp Support Page |
|
| 1038 | + * |
|
| 1039 | + * @since 1.0.0 |
|
| 1040 | + */ |
|
| 1041 | 1041 | function generateSupportPage() {
|
| 1042 | 1042 | |
| 1043 | 1043 | wp_enqueue_script( 'yikes-inc-easy-mailchimp-extender-support-scripts', plugin_dir_url( __FILE__ ) . 'js/support.js', array( 'jquery' ), $this->version, false ); |
@@ -1045,37 +1045,37 @@ discard block |
||
| 1045 | 1045 | } |
| 1046 | 1046 | |
| 1047 | 1047 | /** |
| 1048 | - * Generate Us Easy MailChimp Edit Form Page |
|
| 1049 | - * |
|
| 1050 | - * @since 1.0.0 |
|
| 1051 | - */ |
|
| 1048 | + * Generate Us Easy MailChimp Edit Form Page |
|
| 1049 | + * |
|
| 1050 | + * @since 1.0.0 |
|
| 1051 | + */ |
|
| 1052 | 1052 | function generateEditFormPage() {
|
| 1053 | 1053 | require_once YIKES_MC_PATH . 'admin/partials/edit-form.php'; // include our options page |
| 1054 | 1054 | } |
| 1055 | 1055 | |
| 1056 | 1056 | /** |
| 1057 | - * Generate Us Easy MailChimp View List Page |
|
| 1058 | - * |
|
| 1059 | - * @since 1.0.0 |
|
| 1060 | - */ |
|
| 1057 | + * Generate Us Easy MailChimp View List Page |
|
| 1058 | + * |
|
| 1059 | + * @since 1.0.0 |
|
| 1060 | + */ |
|
| 1061 | 1061 | function generateViewListPage() {
|
| 1062 | 1062 | require_once YIKES_MC_PATH . 'admin/partials/view-list.php'; // include our options page |
| 1063 | 1063 | } |
| 1064 | 1064 | |
| 1065 | 1065 | /** |
| 1066 | - * Generate Us Easy MailChimp View User Page |
|
| 1067 | - * |
|
| 1068 | - * @since 1.0.0 |
|
| 1069 | - */ |
|
| 1066 | + * Generate Us Easy MailChimp View User Page |
|
| 1067 | + * |
|
| 1068 | + * @since 1.0.0 |
|
| 1069 | + */ |
|
| 1070 | 1070 | function generateViewUserPage() {
|
| 1071 | 1071 | require_once YIKES_MC_PATH . 'admin/partials/view-user.php'; // include our options page |
| 1072 | 1072 | } |
| 1073 | 1073 | |
| 1074 | 1074 | /** |
| 1075 | - * Register our plugin settings, and display them on our settings page |
|
| 1076 | - * |
|
| 1077 | - * @since v.5.4 |
|
| 1078 | - **/ |
|
| 1075 | + * Register our plugin settings, and display them on our settings page |
|
| 1076 | + * |
|
| 1077 | + * @since v.5.4 |
|
| 1078 | + **/ |
|
| 1079 | 1079 | function yikes_easy_mc_settings_init() {
|
| 1080 | 1080 | |
| 1081 | 1081 | /* Register General Settings Section */ |
@@ -1193,9 +1193,9 @@ discard block |
||
| 1193 | 1193 | } |
| 1194 | 1194 | |
| 1195 | 1195 | /** |
| 1196 | - * Options Sanitization & Validation |
|
| 1197 | - * @since complete re-write |
|
| 1198 | - **/ |
|
| 1196 | + * Options Sanitization & Validation |
|
| 1197 | + * @since complete re-write |
|
| 1198 | + **/ |
|
| 1199 | 1199 | function yikes_mc_validate_api_key( $input ) {
|
| 1200 | 1200 | if ( $input === '' ) {
|
| 1201 | 1201 | update_option( 'yikes-mc-api-validation', 'invalid_api_key' ); |
@@ -1227,20 +1227,20 @@ discard block |
||
| 1227 | 1227 | } |
| 1228 | 1228 | |
| 1229 | 1229 | /** |
| 1230 | - * Generate Us Easy Forms for MailChimp Options Page |
|
| 1231 | - * |
|
| 1232 | - * @since 1.0.0 |
|
| 1233 | - */ |
|
| 1230 | + * Generate Us Easy Forms for MailChimp Options Page |
|
| 1231 | + * |
|
| 1232 | + * @since 1.0.0 |
|
| 1233 | + */ |
|
| 1234 | 1234 | function generatePageOptions() {
|
| 1235 | 1235 | require_once YIKES_MC_PATH . 'admin/partials/menu/options.php'; // include our options page |
| 1236 | 1236 | } |
| 1237 | 1237 | |
| 1238 | 1238 | /** |
| 1239 | - * Check if users API key is valid, if not |
|
| 1240 | - * this function will apply a disabled attribute |
|
| 1241 | - * to form fields. (input, dropdowns, buttons etc.) |
|
| 1242 | - * @since v5.5 re-write |
|
| 1243 | - **/ |
|
| 1239 | + * Check if users API key is valid, if not |
|
| 1240 | + * this function will apply a disabled attribute |
|
| 1241 | + * to form fields. (input, dropdowns, buttons etc.) |
|
| 1242 | + * @since v5.5 re-write |
|
| 1243 | + **/ |
|
| 1244 | 1244 | public function is_user_mc_api_valid_form( $echo = true ) {
|
| 1245 | 1245 | if ( $echo == true ) {
|
| 1246 | 1246 | if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
|
@@ -1280,7 +1280,7 @@ discard block |
||
| 1280 | 1280 | * Migrate our old options , to the new options API |
| 1281 | 1281 | * moving from 5.5 and beyond.. |
| 1282 | 1282 | * @since |
| 1283 | - */ |
|
| 1283 | + */ |
|
| 1284 | 1284 | public function migrate_old_yks_mc_options() {
|
| 1285 | 1285 | // include our migrate options helper file |
| 1286 | 1286 | include_once YIKES_MC_PATH . 'admin/partials/upgrade-helpers/upgrade-migrate-options.php'; |
@@ -1289,7 +1289,7 @@ discard block |
||
| 1289 | 1289 | /** |
| 1290 | 1290 | Admin Notices |
| 1291 | 1291 | - Notifications displayed at the top of admin pages, back to the user |
| 1292 | - **/ |
|
| 1292 | + **/ |
|
| 1293 | 1293 | |
| 1294 | 1294 | /** |
| 1295 | 1295 | * Check for existing plugin options |
@@ -1348,12 +1348,12 @@ discard block |
||
| 1348 | 1348 | * - http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search |
| 1349 | 1349 | */ |
| 1350 | 1350 | function findMCListID($id, $array) {
|
| 1351 | - foreach ($array as $key => $val) {
|
|
| 1352 | - if ($val['id'] === $id) {
|
|
| 1353 | - return $key; |
|
| 1354 | - } |
|
| 1355 | - } |
|
| 1356 | - return null; |
|
| 1351 | + foreach ($array as $key => $val) {
|
|
| 1352 | + if ($val['id'] === $id) {
|
|
| 1353 | + return $key; |
|
| 1354 | + } |
|
| 1355 | + } |
|
| 1356 | + return null; |
|
| 1357 | 1357 | } // end |
| 1358 | 1358 | |
| 1359 | 1359 | /* Ajax Migrate Options */ |
@@ -1591,13 +1591,13 @@ discard block |
||
| 1591 | 1591 | <?php |
| 1592 | 1592 | |
| 1593 | 1593 | /** |
| 1594 | - * yikes-mailchimp-excluded-redirect-post-types |
|
| 1595 | - * |
|
| 1596 | - * Filter the post types that will not show on the redirect list dropdown. |
|
| 1597 | - * |
|
| 1598 | - * @param array | $excluded_post_types | The array of default excluded post types |
|
| 1599 | - * @return array| $excluded_post_types | The array of user-defined excluded post types |
|
| 1600 | - */ |
|
| 1594 | + * yikes-mailchimp-excluded-redirect-post-types |
|
| 1595 | + * |
|
| 1596 | + * Filter the post types that will not show on the redirect list dropdown. |
|
| 1597 | + * |
|
| 1598 | + * @param array | $excluded_post_types | The array of default excluded post types |
|
| 1599 | + * @return array| $excluded_post_types | The array of user-defined excluded post types |
|
| 1600 | + */ |
|
| 1601 | 1601 | $excluded_post_types = array( 'attachment', 'revision', 'nav_menu_item', 'shop_order', 'shop_order_refund', 'custom_css', 'customize_changeset', 'forum', 'topic', 'reply' ); |
| 1602 | 1602 | $excluded_post_types = apply_filters( 'yikes-mailchimp-excluded-redirect-post-types', $excluded_post_types ); |
| 1603 | 1603 | |
@@ -1733,9 +1733,9 @@ discard block |
||
| 1733 | 1733 | } |
| 1734 | 1734 | |
| 1735 | 1735 | /** |
| 1736 | - * Custom action hook for our extensions to hook into |
|
| 1737 | - * @parameter get_current_screen() current screen information |
|
| 1738 | - */ |
|
| 1736 | + * Custom action hook for our extensions to hook into |
|
| 1737 | + * @parameter get_current_screen() current screen information |
|
| 1738 | + */ |
|
| 1739 | 1739 | do_action( 'yikes-mailchimp-admin-sidebar', get_current_screen() ); |
| 1740 | 1740 | |
| 1741 | 1741 | } |
@@ -2646,13 +2646,13 @@ discard block |
||
| 2646 | 2646 | $result = $this->form_interface->create_form( $form_data ); |
| 2647 | 2647 | |
| 2648 | 2648 | /** |
| 2649 | - * `yikes-mailchimp-after-duplicating-form` |
|
| 2650 | - * |
|
| 2651 | - * @param $post_id_to_clone | int | ID of the original form |
|
| 2652 | - * @param $result | mixed | ID of the new form OR false if the operation failed |
|
| 2653 | - * @param $form_data | array | Array of the form data |
|
| 2654 | - * |
|
| 2655 | - */ |
|
| 2649 | + * `yikes-mailchimp-after-duplicating-form` |
|
| 2650 | + * |
|
| 2651 | + * @param $post_id_to_clone | int | ID of the original form |
|
| 2652 | + * @param $result | mixed | ID of the new form OR false if the operation failed |
|
| 2653 | + * @param $form_data | array | Array of the form data |
|
| 2654 | + * |
|
| 2655 | + */ |
|
| 2656 | 2656 | do_action( 'yikes-mailchimp-after-duplicating-form', $post_id_to_clone, $result, $form_data ); |
| 2657 | 2657 | |
| 2658 | 2658 | if ( false === $result ) {
|