@@ -470,6 +470,9 @@ discard block |
||
| 470 | 470 | $response_body = json_decode( wp_remote_retrieve_body( $response ) ); |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | + /** |
|
| 474 | + * @return string |
|
| 475 | + */ |
|
| 473 | 476 | public function get_premium_license( $plugin_slug ) {
|
| 474 | 477 | |
| 475 | 478 | switch( $plugin_slug ) {
|
@@ -767,6 +770,7 @@ discard block |
||
| 767 | 770 | |
| 768 | 771 | /** |
| 769 | 772 | * Convert the php date format string to a js date format |
| 773 | + * @param string $type |
|
| 770 | 774 | */ |
| 771 | 775 | public function yikes_jQuery_datepicker_date_format_php_to_js( $sFormat, $type ) {
|
| 772 | 776 | switch ( $type ) {
|
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | yikes_easy_mailchimp_stop_bugging_me() |
| 582 | 582 | Remove the Review us notification when user clicks 'Dismiss' |
| 583 | 583 | @since v3.1.1 |
| 584 | - */ |
|
| 584 | + */ |
|
| 585 | 585 | public function yikes_easy_mailchimp_stop_bugging_me() {
|
| 586 | 586 | if ( isset( $_GET['yikes_easy_mc_icons_nobug'] ) && (int) filter_var( $_GET['yikes_easy_mc_icons_nobug'], FILTER_SANITIZE_NUMBER_INT ) === 1 ) {
|
| 587 | 587 | add_option( 'yikes_easy_mailchimp_review_stop_bugging_me', true ); |
@@ -843,9 +843,9 @@ discard block |
||
| 843 | 843 | } |
| 844 | 844 | |
| 845 | 845 | /** |
| 846 | - * Register our admin pages |
|
| 847 | - * used to display data back to the user |
|
| 848 | - **/ |
|
| 846 | + * Register our admin pages |
|
| 847 | + * used to display data back to the user |
|
| 848 | + **/ |
|
| 849 | 849 | public function register_admin_pages() {
|
| 850 | 850 | |
| 851 | 851 | /* Top Level Menu 'Easy Mailchimp' */ |
@@ -964,28 +964,28 @@ discard block |
||
| 964 | 964 | } |
| 965 | 965 | |
| 966 | 966 | /** |
| 967 | - * Generate Us Easy Mailchimp Manage Forms Page |
|
| 968 | - * |
|
| 969 | - * @since 1.0.0 |
|
| 970 | - */ |
|
| 967 | + * Generate Us Easy Mailchimp Manage Forms Page |
|
| 968 | + * |
|
| 969 | + * @since 1.0.0 |
|
| 970 | + */ |
|
| 971 | 971 | function generateManageFormsPage() {
|
| 972 | 972 | require_once YIKES_MC_PATH . 'admin/partials/menu/manage-forms.php'; // include our manage forms page |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | 975 | /** |
| 976 | - * Generate Us Easy Mailchimp Manage Lists Page |
|
| 977 | - * |
|
| 978 | - * @since 1.0.0 |
|
| 979 | - */ |
|
| 976 | + * Generate Us Easy Mailchimp Manage Lists Page |
|
| 977 | + * |
|
| 978 | + * @since 1.0.0 |
|
| 979 | + */ |
|
| 980 | 980 | function generateManageListsPage() {
|
| 981 | 981 | require_once YIKES_MC_PATH . 'admin/partials/menu/manage-lists.php'; // include our lists page |
| 982 | 982 | } |
| 983 | 983 | |
| 984 | 984 | /** |
| 985 | - * Generate Us Easy Mailchimp Support Page |
|
| 986 | - * |
|
| 987 | - * @since 1.0.0 |
|
| 988 | - */ |
|
| 985 | + * Generate Us Easy Mailchimp Support Page |
|
| 986 | + * |
|
| 987 | + * @since 1.0.0 |
|
| 988 | + */ |
|
| 989 | 989 | function generateSupportPage() {
|
| 990 | 990 | |
| 991 | 991 | wp_enqueue_script( 'yikes-inc-easy-mailchimp-extender-support-scripts', plugin_dir_url( __FILE__ ) . 'js/support.js', array( 'jquery' ), $this->version, false ); |
@@ -993,37 +993,37 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | |
| 995 | 995 | /** |
| 996 | - * Generate Us Easy Mailchimp Edit Form Page |
|
| 997 | - * |
|
| 998 | - * @since 1.0.0 |
|
| 999 | - */ |
|
| 996 | + * Generate Us Easy Mailchimp Edit Form Page |
|
| 997 | + * |
|
| 998 | + * @since 1.0.0 |
|
| 999 | + */ |
|
| 1000 | 1000 | function generateEditFormPage() {
|
| 1001 | 1001 | require_once YIKES_MC_PATH . 'admin/partials/edit-form.php'; // include our options page |
| 1002 | 1002 | } |
| 1003 | 1003 | |
| 1004 | 1004 | /** |
| 1005 | - * Generate Us Easy Mailchimp View List Page |
|
| 1006 | - * |
|
| 1007 | - * @since 1.0.0 |
|
| 1008 | - */ |
|
| 1005 | + * Generate Us 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 Us Easy Mailchimp View User Page |
|
| 1015 | - * |
|
| 1016 | - * @since 1.0.0 |
|
| 1017 | - */ |
|
| 1014 | + * Generate Us 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 */ |
@@ -1141,9 +1141,9 @@ discard block |
||
| 1141 | 1141 | } |
| 1142 | 1142 | |
| 1143 | 1143 | /** |
| 1144 | - * Options Sanitization & Validation |
|
| 1145 | - * @since complete re-write |
|
| 1146 | - **/ |
|
| 1144 | + * Options Sanitization & Validation |
|
| 1145 | + * @since complete re-write |
|
| 1146 | + **/ |
|
| 1147 | 1147 | function yikes_mc_validate_api_key( $input ) {
|
| 1148 | 1148 | if ( $input === '' ) {
|
| 1149 | 1149 | update_option( 'yikes-mc-api-validation', 'invalid_api_key' ); |
@@ -1175,20 +1175,20 @@ discard block |
||
| 1175 | 1175 | } |
| 1176 | 1176 | |
| 1177 | 1177 | /** |
| 1178 | - * Generate Us Easy Forms for Mailchimp Options Page |
|
| 1179 | - * |
|
| 1180 | - * @since 1.0.0 |
|
| 1181 | - */ |
|
| 1178 | + * Generate Us Easy Forms for Mailchimp Options Page |
|
| 1179 | + * |
|
| 1180 | + * @since 1.0.0 |
|
| 1181 | + */ |
|
| 1182 | 1182 | function generatePageOptions() {
|
| 1183 | 1183 | require_once YIKES_MC_PATH . 'admin/partials/menu/options.php'; // include our options page |
| 1184 | 1184 | } |
| 1185 | 1185 | |
| 1186 | 1186 | /** |
| 1187 | - * Check if users API key is valid, if not |
|
| 1188 | - * this function will apply a disabled attribute |
|
| 1189 | - * to form fields. (input, dropdowns, buttons etc.) |
|
| 1190 | - * @since v5.5 re-write |
|
| 1191 | - **/ |
|
| 1187 | + * Check if users API key is valid, if not |
|
| 1188 | + * this function will apply a disabled attribute |
|
| 1189 | + * to form fields. (input, dropdowns, buttons etc.) |
|
| 1190 | + * @since v5.5 re-write |
|
| 1191 | + **/ |
|
| 1192 | 1192 | public function is_user_mc_api_valid_form( $echo = true ) {
|
| 1193 | 1193 | if ( $echo == true ) {
|
| 1194 | 1194 | if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
|
@@ -1214,12 +1214,12 @@ discard block |
||
| 1214 | 1214 | * - http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search |
| 1215 | 1215 | */ |
| 1216 | 1216 | function findMCListID($id, $array) {
|
| 1217 | - foreach ($array as $key => $val) {
|
|
| 1218 | - if ($val['id'] === $id) {
|
|
| 1219 | - return $key; |
|
| 1220 | - } |
|
| 1221 | - } |
|
| 1222 | - return null; |
|
| 1217 | + foreach ($array as $key => $val) {
|
|
| 1218 | + if ($val['id'] === $id) {
|
|
| 1219 | + return $key; |
|
| 1220 | + } |
|
| 1221 | + } |
|
| 1222 | + return null; |
|
| 1223 | 1223 | } // end |
| 1224 | 1224 | |
| 1225 | 1225 | /* |
@@ -1394,13 +1394,13 @@ discard block |
||
| 1394 | 1394 | <?php |
| 1395 | 1395 | |
| 1396 | 1396 | /** |
| 1397 | - * yikes-mailchimp-excluded-redirect-post-types |
|
| 1398 | - * |
|
| 1399 | - * Filter the post types that will not show on the redirect list dropdown. |
|
| 1400 | - * |
|
| 1401 | - * @param array | $excluded_post_types | The array of default excluded post types |
|
| 1402 | - * @return array| $excluded_post_types | The array of user-defined excluded post types |
|
| 1403 | - */ |
|
| 1397 | + * yikes-mailchimp-excluded-redirect-post-types |
|
| 1398 | + * |
|
| 1399 | + * Filter the post types that will not show on the redirect list dropdown. |
|
| 1400 | + * |
|
| 1401 | + * @param array | $excluded_post_types | The array of default excluded post types |
|
| 1402 | + * @return array| $excluded_post_types | The array of user-defined excluded post types |
|
| 1403 | + */ |
|
| 1404 | 1404 | $excluded_post_types = array( 'attachment', 'revision', 'nav_menu_item', 'shop_order', 'shop_order_refund', 'custom_css', 'customize_changeset', 'forum', 'topic', 'reply' ); |
| 1405 | 1405 | $excluded_post_types = apply_filters( 'yikes-mailchimp-excluded-redirect-post-types', $excluded_post_types ); |
| 1406 | 1406 | |
@@ -1530,9 +1530,9 @@ discard block |
||
| 1530 | 1530 | } |
| 1531 | 1531 | |
| 1532 | 1532 | /** |
| 1533 | - * Custom action hook for our extensions to hook into |
|
| 1534 | - * @parameter get_current_screen() current screen information |
|
| 1535 | - */ |
|
| 1533 | + * Custom action hook for our extensions to hook into |
|
| 1534 | + * @parameter get_current_screen() current screen information |
|
| 1535 | + */ |
|
| 1536 | 1536 | do_action( 'yikes-mailchimp-admin-sidebar', get_current_screen() ); |
| 1537 | 1537 | |
| 1538 | 1538 | } |
@@ -2454,13 +2454,13 @@ discard block |
||
| 2454 | 2454 | $result = $this->form_interface->create_form( $form_data ); |
| 2455 | 2455 | |
| 2456 | 2456 | /** |
| 2457 | - * `yikes-mailchimp-after-duplicating-form` |
|
| 2458 | - * |
|
| 2459 | - * @param $post_id_to_clone | int | ID of the original form |
|
| 2460 | - * @param $result | mixed | ID of the new form OR false if the operation failed |
|
| 2461 | - * @param $form_data | array | Array of the form data |
|
| 2462 | - * |
|
| 2463 | - */ |
|
| 2457 | + * `yikes-mailchimp-after-duplicating-form` |
|
| 2458 | + * |
|
| 2459 | + * @param $post_id_to_clone | int | ID of the original form |
|
| 2460 | + * @param $result | mixed | ID of the new form OR false if the operation failed |
|
| 2461 | + * @param $form_data | array | Array of the form data |
|
| 2462 | + * |
|
| 2463 | + */ |
|
| 2464 | 2464 | do_action( 'yikes-mailchimp-after-duplicating-form', $post_id_to_clone, $result, $form_data ); |
| 2465 | 2465 | |
| 2466 | 2466 | if ( false === $result ) {
|