add_attachment.php
1 month ago
admin_head.php
1 month ago
admin_init.php
1 month ago
admin_menu.php
1 month ago
admin_notices.php
1 month ago
attachment_updated.php
1 month ago
delete_post.php
1 month ago
pmxi_after_xml_import.php
1 month ago
pmxi_before_xml_import.php
1 month ago
pmxi_extend_options_custom_fields.php
1 month ago
wp_ajax_auto_detect_cf.php
1 month ago
wp_ajax_auto_detect_sf.php
1 month ago
wp_ajax_delete_import.php
1 month ago
wp_ajax_dismiss_notifications.php
1 month ago
wp_ajax_import_failed.php
1 month ago
wp_ajax_test_images.php
1 month ago
wp_ajax_wpai_dismiss_review_modal.php
1 month ago
wp_ajax_wpai_send_feedback.php
1 month ago
wpmu_new_blog.php
1 month ago
admin_notices.php
161 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 4 | function pmxi_admin_notices() { |
| 5 | |
| 6 | // compare woocommerce add-on version |
| 7 | if ( class_exists( 'PMWI_Plugin' ) and ( defined('PMWI_VERSION') and version_compare(PMWI_VERSION, '2.1.4') < 0 and PMWI_EDITION == 'paid' or defined('PMWI_FREE_VERSION') and version_compare(PMWI_FREE_VERSION, '1.2.2') < 0 and PMWI_EDITION == 'free') ) { |
| 8 | ?> |
| 9 | <div class="error"><p> |
| 10 | <?php echo wp_kses( |
| 11 | sprintf( |
| 12 | /* translators: %s: plugin name */ |
| 13 | __('<b>%s Plugin</b>: Please update your WP All Import WooCommerce add-on to the latest version', 'wp-all-import'), |
| 14 | esc_html(PMWI_Plugin::getInstance()->getName()) |
| 15 | ), |
| 16 | array('b' => array()) |
| 17 | ) ?> |
| 18 | </p></div> |
| 19 | <?php |
| 20 | |
| 21 | if (defined('PMWI_EDITION') and PMWI_EDITION == 'paid') |
| 22 | { |
| 23 | deactivate_plugins( PMWI_ROOT_DIR . '/wpai-woocommerce-add-on.php'); |
| 24 | } |
| 25 | else |
| 26 | { |
| 27 | if (defined('PMWI_FREE_ROOT_DIR')){ |
| 28 | deactivate_plugins( PMWI_FREE_ROOT_DIR . '/plugin.php'); |
| 29 | } |
| 30 | else{ |
| 31 | deactivate_plugins( PMWI_ROOT_DIR . '/plugin.php'); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | } |
| 36 | |
| 37 | // compare ACF add-on |
| 38 | if ( class_exists( 'PMAI_Plugin' ) and defined('PMAI_VERSION') and version_compare(PMAI_VERSION, '3.0.0-beta1') < 0 and PMAI_EDITION == 'paid' ) { |
| 39 | ?> |
| 40 | <div class="error"><p> |
| 41 | <?php echo wp_kses( |
| 42 | sprintf( |
| 43 | /* translators: %s: plugin name */ |
| 44 | __('<b>%s Plugin</b>: Please update your WP All Import ACF add-on to the latest version', 'wp-all-import'), |
| 45 | esc_html(PMAI_Plugin::getInstance()->getName()) |
| 46 | ), |
| 47 | array('b' => array()) |
| 48 | ) ?> |
| 49 | </p></div> |
| 50 | <?php |
| 51 | |
| 52 | if (defined('PMAI_EDITION') and PMAI_EDITION == 'paid') |
| 53 | { |
| 54 | deactivate_plugins( PMAI_ROOT_DIR . '/wpai-acf-add-on.php'); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // compare Linkcloak add-on |
| 59 | if ( class_exists( 'PMLCA_Plugin' ) and defined('PMLCA_VERSION') and version_compare(PMLCA_VERSION, '1.0.0-beta1') < 0 and PMLCA_EDITION == 'paid' ) { |
| 60 | ?> |
| 61 | <div class="error"><p> |
| 62 | <?php echo wp_kses( |
| 63 | sprintf( |
| 64 | /* translators: %s: plugin name */ |
| 65 | __('<b>%s Plugin</b>: Please update your WP All Import Linkcloak add-on to the latest version', 'wp-all-import'), |
| 66 | esc_html(PMLCA_Plugin::getInstance()->getName()) |
| 67 | ), |
| 68 | array('b' => array()) |
| 69 | ) ?> |
| 70 | </p></div> |
| 71 | <?php |
| 72 | |
| 73 | if (defined('PMLCA_EDITION') and PMLCA_EDITION == 'paid') |
| 74 | { |
| 75 | deactivate_plugins( PMLCA_ROOT_DIR . '/wpai-linkcloak-add-on.php'); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // compare User add-on |
| 80 | if ( class_exists( 'PMUI_Plugin' ) and defined('PMUI_VERSION') and version_compare(PMUI_VERSION, '1.0.0-beta1') < 0 and PMUI_EDITION == 'paid' ) { |
| 81 | ?> |
| 82 | <div class="error"><p> |
| 83 | <?php echo wp_kses( |
| 84 | sprintf( |
| 85 | /* translators: %s: plugin name */ |
| 86 | __('<b>%s Plugin</b>: Please update your WP All Import User add-on to the latest version', 'wp-all-import'), |
| 87 | esc_html(PMUI_Plugin::getInstance()->getName()) |
| 88 | ), |
| 89 | array('b' => array()) |
| 90 | ) ?> |
| 91 | </p></div> |
| 92 | <?php |
| 93 | |
| 94 | if (defined('PMUI_EDITION') and PMUI_EDITION == 'paid') |
| 95 | { |
| 96 | deactivate_plugins( PMUI_ROOT_DIR . '/wpai-user-add-on.php'); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | // compare WPML add-on |
| 101 | if ( class_exists( 'PMLI_Plugin' ) and defined('PMLI_VERSION') and version_compare(PMLI_VERSION, '1.0.0-beta1') < 0 and PMLI_EDITION == 'paid' ) { |
| 102 | ?> |
| 103 | <div class="error"><p> |
| 104 | <?php echo wp_kses( |
| 105 | sprintf( |
| 106 | /* translators: %s: plugin name */ |
| 107 | __('<b>%s Plugin</b>: Please update your WP All Import WPML add-on to the latest version', 'wp-all-import'), |
| 108 | esc_html(PMLI_Plugin::getInstance()->getName()) |
| 109 | ), |
| 110 | array('b' => array()) |
| 111 | ) ?> |
| 112 | </p></div> |
| 113 | <?php |
| 114 | |
| 115 | if (defined('PMLI_EDITION') and PMLI_EDITION == 'paid') |
| 116 | { |
| 117 | deactivate_plugins( PMLI_ROOT_DIR . '/plugin.php'); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | $input = new PMXI_Input(); |
| 122 | $messages = $input->get('pmxi_nt', array()); |
| 123 | if ($messages) { |
| 124 | is_array($messages) or $messages = array($messages); |
| 125 | foreach ($messages as $type => $m) { |
| 126 | in_array((string)$type, array('updated', 'error')) or $type = 'updated'; |
| 127 | ?> |
| 128 | <div class="<?php echo esc_attr($type); ?>"><p><?php echo wp_kses_post($m); ?></p></div> |
| 129 | <?php |
| 130 | } |
| 131 | } |
| 132 | $warnings = $input->get('warnings', array()); |
| 133 | if ($warnings) { |
| 134 | is_array($warnings) or $warnings = explode(',', $warnings); |
| 135 | foreach ($warnings as $code) { |
| 136 | switch ($code) { |
| 137 | case 1: |
| 138 | $m = __('<strong>Warning:</strong> your title is blank.', 'wp-all-import'); |
| 139 | break; |
| 140 | case 2: |
| 141 | $m = __('<strong>Warning:</strong> your content is blank.', 'wp-all-import'); |
| 142 | break; |
| 143 | case 3: |
| 144 | $m = __('<strong>Warning:</strong> You must <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=5839966&edd_options%5Bprice_id%5D=1&discount=welcome-upgrade-99&utm_source=import-plugin-free&utm_medium=upgrade-notice&utm_campaign=images" target="_blank">upgrade to the Pro edition of WP All Import</a> to import images. The settings you configured in the images section will be ignored.', 'wp-all-import'); |
| 145 | break; |
| 146 | case 4: |
| 147 | $m = __('<strong>Warning:</strong> You must <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=5839966&edd_options%5Bprice_id%5D=1&discount=welcome-upgrade-99&utm_source=import-plugin-free&utm_medium=upgrade-notice&utm_campaign=custom-fields" target="_blank">upgrade to the Pro edition of WP All Import</a> to import data to Custom Fields. The settings you configured in the Custom Fields section will be ignored.', 'wp-all-import'); |
| 148 | break; |
| 149 | default: |
| 150 | $m = false; |
| 151 | break; |
| 152 | } |
| 153 | if ($m): |
| 154 | ?> |
| 155 | <div class="error"><p><?php echo wp_kses_post($m); ?></p></div> |
| 156 | <?php |
| 157 | endif; |
| 158 | } |
| 159 | } |
| 160 | wp_all_import_addon_notifications(); |
| 161 | } |