PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
← All changes | class/Common/Plugin/Menu.php +41 -8 2.8.02.15.0 View file →
@@ -40,10 +40,34 @@
40 40
41 41 add_action('admin_menu', array($this, 'register_tools_menu'));
42 42 add_action('tool_box', array($this->view_manager, 'tool_box'));
43 43 add_filter('plugin_action_links_' . $this->properties->plugin_basename, array($this, 'add_plugin_links'));
44 + add_filter('update_footer', [$this, 'add_footer_text_right'], 20);
45 + add_filter('admin_footer_text', [$this, 'add_footer_text_left']);
44 46 }
45 47
48 + public function add_footer_text_left($text)
49 + {
50 + $screen = get_current_screen();
51 + if ($screen->id !== 'tools_page_importwp') {
52 + return $text;
53 + }
54 +
55 + return '<a target="_blank" href="https://www.importwp.com/support/">Contact support</a> | Add your <a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/jc-importer#postform">★★★★★</a> on <a target="_blank" href="http://wordpress.org/plugins/jc-importer/">wordpress.org</a>';
56 + }
57 +
58 + public function add_footer_text_right($text)
59 + {
60 + $screen = get_current_screen();
61 + if ($screen->id !== 'tools_page_importwp') {
62 + return $text;
63 + }
64 +
65 + return '<a class="iwp-footer-link" target="_blank" href="https://translate.wordpress.org/projects/wp-plugins/jc-importer/"><span class="dashicons dashicons-translation"></span> Translate</a> |
66 + <a class="iwp-footer-link" target="_blank" href="https://www.importwp.com/documentation/?utm_campaign=support%2Bdocs&utm_source=Import%2BWP%2BFree&utm_medium=footer">View Documentation</a> |
67 + ImportWP v' . IWP_VERSION . (defined('IWP_PRO_VERSION') ? ' | ImportWP PRO v' . IWP_PRO_VERSION : '');
68 + }
69 +
46 70 public function register_tools_menu()
47 71 {
48 72 $title = __('Import WP', $this->properties->plugin_domain);
49 73
@@ -60,12 +84,12 @@
60 84 return array_merge(
61 85 [
62 86 '<a href="' .
63 87 admin_url('tools.php?page=' . $this->properties->plugin_domain) .
64 - '">' . __('Dashboard', 'importwp') . '</a>',
88 + '">' . __('Dashboard', 'jc-importer') . '</a>',
65 89 '<a href="' .
66 90 admin_url('tools.php?page=' . $this->properties->plugin_domain . '&tab=settings') .
67 - '">' . __('Settings', 'importwp') . '</a>',
91 + '">' . __('Settings', 'jc-importer') . '</a>',
68 92 ],
69 93 $links
70 94 );
71 95 }
@@ -87,8 +111,9 @@
87 111 $template_data = [];
88 112 foreach ($templates as $template_id => $template) {
89 113
90 114 $template_class = $this->template_manager->load_template($template);
115 + $unique_fields = $this->template_manager->get_template_unique_fields($template_class);
91 116
92 117 $template_data[] = [
93 118 'id' => $template_id,
94 119 'label' => $template_class->get_name(),
@@ -94,8 +119,9 @@
94 119 'label' => $template_class->get_name(),
95 120 'map' => [],
96 121 'settings' => $template_class->register_settings(),
97 122 'options' => $template_class->register_options(),
123 + 'unique_fields' => $unique_fields
98 124 ];
99 125 }
100 126
101 127 $migrations = new Migrations();
@@ -100,19 +126,26 @@
100 126
101 127 $migrations = new Migrations();
102 128 $is_setup = $migrations->isSetup() ? 'yes' : 'no';
103 129
130 + $pro_version = '';
131 + if (defined('IWP_PRO_VERSION') && $this->properties->is_pro) {
132 + $pro_version .= ' (v' . IWP_PRO_VERSION . ' PRO)';
133 + }
134 +
104 135 wp_localize_script($this->properties->plugin_domain . '-bundle', 'iwp', array(
105 136 'root' => esc_url_raw(rest_url()),
106 137 'nonce' => wp_create_nonce('wp_rest'),
138 + 'download_nonce' => wp_create_nonce('iwp_export_download'),
107 139 'admin_base' => $ajax_base,
108 140 'ajax_base' => rest_url('/' . $this->properties->rest_namespace . '/' . $this->properties->rest_version),
109 141 'templates' => $template_data,
110 142 'is_setup' => $is_setup,
111 143 'plugin_url' => plugin_dir_url($this->properties->plugin_file_path),
112 - 'version' => $this->properties->plugin_version,
144 + 'version' => 'v' . $this->properties->plugin_version . $pro_version,
113 145 'encodings' => $this->properties->encodings,
114 146 'is_pro' => $this->properties->is_pro ? 'yes' : 'no',
147 + 'is_debug' => $this->importer_manager->is_debug() ? 'yes' : 'no',
115 148 'export_fields' => $this->get_export_fields(),
116 149 'registered_addons' => apply_filters('iwp/register_js', []),
117 150 'global_notices' => apply_filters('iwp/frontent/notices', [])
118 151 ));
@@ -182,16 +215,16 @@
182 215
183 216 $screen->add_help_tab(array(
184 217 'id' => 'iwp_help_tab',
185 218 'title' => __('Overview'),
186 - 'content' => '<p>' . __('Import WP allows you to import any XML or CSV file into WordPress posts, pages, users, categories and tags.', 'importwp') . '</p>',
219 + 'content' => '<p>' . __('ImportWP allows you to import any XML or CSV file into WordPress posts, pages, users, categories and tags.', 'jc-importer') . '</p>',
187 220 ));
188 221
189 222 $screen->add_help_tab([
190 223 'id' => 'iwp_support_tab',
191 - 'title' => __('Plugin Support', 'importwp'),
192 - 'content' => '<p>' . __('Import WP has the following support:', 'importwp') . '</p>'
193 - . '<p>' . __('<strong>Plugin documentation</strong> — Online documentation can be found at <a href="https://www.importwp.com/docs/?utm_campaign=support%2Bdocs&utm_source=Import%2BWP%2BFree&utm_medium=help%2Btab" target="_blank">https://www.importwp.com/docs/</a>', 'importwp') . '</p>'
194 - . '<p>' . __('<strong>Support Tickets</strong> — Support requests are handled on our support system at <a href="https://helpdesk.importwp.com/" target="_blank">https://helpdesk.importwp.com/</a>', 'importwp') . '</p>',
224 + 'title' => __('Plugin Support', 'jc-importer'),
225 + 'content' => '<p>' . __('Import WP has the following support:', 'jc-importer') . '</p>'
226 + . '<p>' . sprintf(__('documentation — Online documentation can be found at %s', 'jc-importer'), '<a href="https://www.importwp.com/docs/?utm_campaign=support%2Bdocs&utm_source=Import%2BWP%2BFree&utm_medium=help%2Btab" target="_blank">https://www.importwp.com/docs/</a>') . '</p>'
227 + . '<p>' . sprintf(__('Support Tickets — Support requests are handled on our support system at %s', 'jc-importer'), '<a href="https://helpdesk.importwp.com/" target="_blank">https://helpdesk.importwp.com/</a>') . '</p>',
195 228 ]);
196 229 }
197 230 }