PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.1.5
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.1.5
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / views / admin / manage / index.php
wp-all-export / views / admin / manage Last commit date
bulk.php 8 years ago delete.php 8 years ago index.php 8 years ago scheduling.php 8 years ago templates.php 8 years ago update.php 8 years ago
index.php
379 lines
1 <div class="wpallexport-header" style="overflow:hidden; height: 60px; padding-top: 10px; margin-bottom: -20px;">
2 <div class="wpallexport-logo"></div>
3 <div class="wpallexport-title">
4 <p><?php _e('WP All Export', 'wp_all_export_plugin'); ?></p>
5 <h3><?php _e('Manage Exports', 'wp_all_export_plugin'); ?></h3>
6 </div>
7 </div>
8
9 <h2></h2> <!-- Do not remove -->
10
11 <?php if ($this->errors->get_error_codes()): ?>
12 <?php $this->error() ?>
13 <?php endif ?>
14
15 <form method="get">
16 <input type="hidden" name="page" value="<?php echo esc_attr($this->input->get('page')) ?>" />
17 <p class="search-box">
18 <label for="search-input" class="screen-reader-text"><?php _e('Search Exports', 'wp_all_export_plugin') ?>:</label>
19 <input id="search-input" type="text" name="s" value="<?php echo esc_attr($s) ?>" />
20 <input type="submit" class="button" value="<?php _e('Search Exports', 'wp_all_export_plugin') ?>">
21 </p>
22 </form>
23
24 <?php
25 // define the columns to display, the syntax is 'internal name' => 'display name'
26 $columns = array(
27 'id' => __('ID', 'wp_all_export_plugin'),
28 'name' => __('Name', 'wp_all_export_plugin'),
29 'actions' => '',
30 'data' => __('Query', 'wp_all_export_plugin'),
31 //'format' => __('Format', 'wp_all_export_plugin'),
32 'summary' => __('Summary', 'wp_all_export_plugin'),
33 //'registered_on' => __('Last Export', 'wp_all_export_plugin'),
34 'info' => __('Info & Options', 'wp_all_export_plugin'),
35 );
36
37 //if ( ! wp_all_export_is_compatible()) unset($columns['info']);
38
39 $columns = apply_filters('pmxe_manage_imports_columns', $columns);
40
41 ?>
42
43 <form method="post" id="import-list" action="<?php echo remove_query_arg('pmxe_nt') ?>">
44
45 <input type="hidden" name="action" value="bulk" />
46 <?php wp_nonce_field('bulk-exports', '_wpnonce_bulk-exports') ?>
47
48 <div class="tablenav">
49 <div class="alignleft actions">
50 <select name="bulk-action">
51 <option value="" selected="selected"><?php _e('Bulk Actions', 'wp_all_export_plugin') ?></option>
52 <option value="delete"><?php _e('Delete', 'wp_all_export_plugin') ?></option>
53 </select>
54 <input type="submit" value="<?php esc_attr_e('Apply', 'wp_all_export_plugin') ?>" name="doaction" id="doaction" class="button-secondary action" />
55 </div>
56
57 <?php if ($page_links): ?>
58 <div class="tablenav-pages">
59 <?php echo $page_links_html = sprintf(
60 '<span class="displaying-num">' . __('Displaying %s&#8211;%s of %s', 'wp_all_export_plugin') . '</span>%s',
61 number_format_i18n(($pagenum - 1) * $perPage + 1),
62 number_format_i18n(min($pagenum * $perPage, $list->total())),
63 number_format_i18n($list->total()),
64 $page_links
65 ) ?>
66 </div>
67 <?php endif ?>
68 </div>
69 <div class="clear"></div>
70
71 <table class="widefat pmxe-admin-exports">
72 <thead>
73 <tr>
74 <th class="manage-column column-cb check-column" scope="col">
75 <input type="checkbox" />
76 </th>
77 <?php
78 $col_html = '';
79 foreach ($columns as $column_id => $column_display_name) {
80 $column_link = "<a href='";
81 $order2 = 'ASC';
82 if ($order_by == $column_id)
83 $order2 = ($order == 'DESC') ? 'ASC' : 'DESC';
84
85 $column_link .= esc_url(add_query_arg(array('order' => $order2, 'order_by' => $column_id), $this->baseUrl));
86 $column_link .= "'>{$column_display_name}</a>";
87 $col_html .= '<th scope="col" class="column-' . $column_id . ' ' . ($order_by == $column_id ? $order : '') . '">' . $column_link . '</th>';
88 }
89 echo $col_html;
90 ?>
91 </tr>
92 </thead>
93 <tfoot>
94 <tr>
95 <th class="manage-column column-cb check-column" scope="col">
96 <input type="checkbox" />
97 </th>
98 <?php echo $col_html; ?>
99 </tr>
100 </tfoot>
101 <tbody id="the-pmxi-admin-import-list" class="list:pmxe-admin-exports">
102 <?php if ($list->isEmpty()): ?>
103 <tr>
104 <td colspan="<?php echo count($columns) + 1 ?>"><?php _e('No previous exports found.', 'wp_all_export_plugin') ?></td>
105 </tr>
106 <?php else: ?>
107 <?php
108
109 $is_secure_import = PMXE_Plugin::getInstance()->getOption('secure');
110
111 $class = '';
112 ?>
113 <?php foreach ($list as $item):?>
114 <?php $class = ('alternate' == $class) ? '' : 'alternate'; ?>
115 <tr class="<?php echo $class; ?>" valign="middle">
116 <th scope="row" class="check-column">
117 <input type="checkbox" id="item_<?php echo $item['id'] ?>" name="items[]" value="<?php echo esc_attr($item['id']) ?>" />
118 </th>
119 <?php foreach ($columns as $column_id => $column_display_name): ?>
120 <?php
121 switch ($column_id):
122 case 'id':
123 ?>
124 <th valign="top" scope="row">
125 <?php echo $item['id'] ?>
126 </th>
127 <?php
128 break;
129 case 'name':
130 ?>
131 <td style="min-width: 325px;">
132 <strong><?php echo $item['friendly_name']; ?></strong> <br>
133 <div class="row-actions">
134 <span class="edit"><a class="edit" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'template'), $this->baseUrl)) ?>"><?php _e('Edit Export', 'wp_all_export_plugin') ?></a></span> |
135 <span class="edit"><a class="edit" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'options'), $this->baseUrl)) ?>"><?php _e('Export Settings', 'wp_all_export_plugin') ?></a></span> |
136
137 <?php if ( ! $is_secure_import and $item['attch_id']): ?>
138 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'get_file', '_wpnonce' => wp_create_nonce( '_wpnonce-download_feed' )), $this->baseUrl)) ?>"><?php echo strtoupper(wp_all_export_get_export_format($item['options'])); ?></a></span> |
139 <?php if (! empty($item['options']['bundlepath']) and PMXE_Export_Record::is_bundle_supported($item['options'])):?>
140 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'bundle', '_wpnonce' => wp_create_nonce( '_wpnonce-download_bundle' )), $this->baseUrl)) ?>"><?php _e('Bundle', 'wp_all_export_plugin'); ?></a></span> |
141 <?php endif; ?>
142 <?php endif; ?>
143
144 <?php if ($is_secure_import and ! empty($item['options']['filepath'])): ?>
145 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'get_file', '_wpnonce' => wp_create_nonce( '_wpnonce-download_feed' )), $this->baseUrl)) ?>"><?php echo strtoupper(wp_all_export_get_export_format($item['options'])); ?></a></span> |
146 <?php if (! empty($item['options']['bundlepath']) and PMXE_Export_Record::is_bundle_supported($item['options'])):?>
147 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'bundle', '_wpnonce' => wp_create_nonce( '_wpnonce-download_bundle' )), $this->baseUrl)) ?>"><?php _e('Bundle', 'wp_all_export_plugin'); ?></a></span> |
148 <?php endif; ?>
149 <?php endif; ?>
150
151 <?php if ( ! empty($item['options']['split_large_exports']) and ! empty($item['options']['split_files_list']) ): ?>
152 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'split_bundle', '_wpnonce' => wp_create_nonce( '_wpnonce-download_split_bundle' )), $this->baseUrl)) ?>"><?php printf(__('Split %ss', 'wp_all_export_plugin'), strtoupper(wp_all_export_get_export_format($item['options']))); ?></a></span> |
153 <?php endif; ?>
154
155 <span class="delete"><a class="delete" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'delete'), $this->baseUrl)) ?>"><?php _e('Delete', 'wp_all_export_plugin') ?></a></span>
156 </div>
157 </td>
158 <?php
159 break;
160 case 'info':
161 ?>
162 <td style="min-width: 180px;">
163 <a href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'scheduling'), $this->baseUrl)?>"><?php _e('Cron Scheduling', 'wp_all_export_plugin'); ?></a> <br>
164 <?php
165 $is_re_import_allowed = true;
166 if ( ! empty($item['options']['ids']) )
167 {
168 if (in_array('shop_order', $item['options']['cpt']) and class_exists('WooCommerce')) {
169 $required_fields = array('woo_order' => 'id');
170 }
171 else {
172 $required_fields = array('id' => 'id');
173 }
174 // re-import products
175 if ((in_array('product', $item['options']['cpt']) or $item['options']['export_type'] == 'advanced') and class_exists('WooCommerce') and (empty($item['options']['wp_query_selector']) or $item['options']['wp_query_selector'] == 'wp_query')) {
176 $required_fields['woo'] = '_sku';
177 $required_fields['cats'] = 'product_type';
178 $required_fields['parent'] = 'parent';
179 }
180 if ((in_array('users', $item['options']['cpt']) or $item['options']['export_type'] == 'advanced') and (!empty($item['options']['wp_query_selector']) and $item['options']['wp_query_selector'] == 'wp_user_query')) {
181 $required_fields['user_email'] = 'user_email';
182 $required_fields['user_login'] = 'user_login';
183 }
184 if ($item['options']['export_type'] == 'advanced' and (empty($item['options']['wp_query_selector']) or $item['options']['wp_query_selector'] == 'wp_query')){
185 $required_fields['post_type'] = 'post_type';
186 }
187 $defined_fields = array();
188 foreach ($item['options']['ids'] as $ID => $value)
189 {
190 foreach ($required_fields as $type => $field)
191 {
192 if (strtolower($item['options']['cc_type'][$ID]) == $type && strtolower($item['options']['cc_label'][$ID]) == strtolower($field)){
193 $defined_fields[] = $field;
194 }
195 }
196 }
197
198 foreach ($required_fields as $type => $field) {
199 if ( ! in_array($field, $defined_fields) ){
200 $is_re_import_allowed = false;
201 break;
202 }
203 }
204
205 // if ($is_re_import_allowed and wp_all_export_is_compatible() and ! empty($item['options']['import_id'])){
206 // $import = new PMXI_Import_Record();
207 // $import->getById($item['options']['import_id']);
208 // if ($import->isEmpty() or $import->parent_import_id == 0){
209 // $item['options']['import_id'] = 0;
210 // }
211 // }
212 }
213
214 ?>
215 <?php if ( $item['options']['export_to'] == 'csv' || ( empty($item['options']['xml_template_type']) || ! in_array($item['options']['xml_template_type'], array('custom', 'XmlGoogleMerchants'))) ): ?>
216 <?php if ( wp_all_export_is_compatible() and !empty($item['options']['import_id']) and $is_re_import_allowed): ?>
217 <a href="<?php echo add_query_arg(array('page' => 'pmxi-admin-import', 'id' => $item['options']['import_id'], 'deligate' => 'wpallexport'), remove_query_arg('page', $this->baseUrl)); ?>"><?php _e("Import with WP All Import", "wp_all_export_plugin"); ?></a><br/>
218 <?php endif;?>
219 <?php
220 if ( !in_array($item['options']['wp_query_selector'], array('wp_comment_query')) and (empty($item['options']['cpt']) or ! in_array('comments', $item['options']['cpt']))) {
221 if ( ! empty($item['options']['tpl_data'])) {
222 //$template->getByName($item['options']['template_name']);
223 //if ( ! $template->isEmpty() ){
224 ?>
225 <a href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'templates'), $this->baseUrl)?>"><?php _e('Download Import Templates', 'wp_all_export_plugin'); ?></a>
226 <?php
227 //}
228 }
229 }
230 ?>
231 <?php endif; ?>
232 </td>
233 <?php
234 break;
235 case 'data':
236 ?>
237 <td>
238 <?php echo (!empty($item['options']['cpt'])) ? '<strong>' . __('Post Types: ') . '</strong> ' . implode(', ', $item['options']['cpt']) : $item['options']['wp_query']; ?>
239 </td>
240 <?php
241 break;
242 case 'format':
243 ?>
244 <td>
245 <strong><?php echo ($item['options']['export_to'] == 'csv' && ! empty($item['options']['export_to_sheet'])) ? $item['options']['export_to_sheet'] : $item['options']['export_to']; ?></strong>
246 </td>
247 <?php
248 break;
249 case 'registered_on':
250 ?>
251 <td>
252 <?php if ('0000-00-00 00:00:00' == $item['registered_on']): ?>
253 <em>never</em>
254 <?php else: ?>
255 <?php echo mysql2date(__('Y/m/d g:i a', 'wp_all_export_plugin'), $item['registered_on']) ?>
256 <?php endif ?>
257 </td>
258 <?php
259 break;
260 case 'summary':
261 ?>
262 <td>
263 <?php
264 if ($item['triggered'] and ! $item['processing']){
265 _e('triggered with cron', 'wp_all_export_plugin');
266 if ($item['last_activity'] != '0000-00-00 00:00:00'){
267 $diff = ceil((time() - strtotime($item['last_activity']))/60);
268 ?>
269 <br>
270 <span <?php if ($diff >= 10) echo 'style="color:red;"';?>>
271 <?php
272 printf(__('last activity %s ago', 'wp_all_export_plugin'), human_time_diff(strtotime($item['last_activity']), time()));
273 ?>
274 </span>
275 <?php
276 }
277 }
278 elseif ($item['processing']){
279 _e('currently processing with cron', 'wp_all_export_plugin'); echo '<br/>';
280 printf('Records Processed %s', $item['exported']);
281 if ($item['last_activity'] != '0000-00-00 00:00:00'){
282 $diff = ceil((time() - strtotime($item['last_activity']))/60);
283 ?>
284 <br>
285 <span <?php if ($diff >= 10) echo 'style="color:red;"';?>>
286 <?php
287 printf(__('last activity %s ago', 'wp_all_export_plugin'), human_time_diff(strtotime($item['last_activity']), time()));
288 ?>
289 </span>
290 <?php
291 }
292 }
293 elseif($item['executing']){
294 _e('Export currently in progress', 'wp_all_export_plugin');
295 if ($item['last_activity'] != '0000-00-00 00:00:00'){
296 $diff = ceil((time() - strtotime($item['last_activity']))/60);
297 ?>
298 <br>
299 <span <?php if ($diff >= 10) echo 'style="color:red;"';?>>
300 <?php
301 printf(__('last activity %s ago', 'wp_all_export_plugin'), human_time_diff(strtotime($item['last_activity']), time()));
302 ?>
303 </span>
304 <?php
305 }
306 }
307 elseif($item['canceled'] and $item['canceled_on'] != '0000-00-00 00:00:00'){
308 printf(__('Export Attempt at %s', 'wp_all_export_plugin'), get_date_from_gmt($item['canceled_on'], "m/d/Y g:i a")); echo '<br/>';
309 _e('Export canceled', 'wp_all_export_plugin');
310 }
311 else{
312 printf(__('Last run: %s', 'wp_all_export_plugin'), ($item['registered_on'] == '0000-00-00 00:00:00') ? __('never', 'wp_all_export_plugin') : get_date_from_gmt($item['registered_on'], "m/d/Y g:i a")); echo '<br/>';
313 printf(__('%d Records Exported', 'wp_all_export_plugin'), $item['exported']); echo '<br/>';
314 $export_to = ($item['options']['export_to'] == 'csv' && ! empty($item['options']['export_to_sheet'])) ? $item['options']['export_to_sheet'] : $item['options']['export_to'];
315 printf(__('Format: %s', 'wp_all_export_plugin'), $export_to); echo '<br/>';
316 //printf(__('%d records', 'wp_all_export_plugin'), $item['post_count']);
317 }
318
319 if ($item['settings_update_on'] != '0000-00-00 00:00:00' and $item['last_activity'] != '0000-00-00 00:00:00' and strtotime($item['settings_update_on']) > strtotime($item['last_activity'])){
320 ?>
321 <strong><?php _e('settings edited since last run', 'wp_all_export_plugin'); ?></strong>
322 <?php
323 }
324
325 ?>
326 </td>
327 <?php
328 break;
329 case 'actions':
330 ?>
331 <td style="min-width: 130px;">
332 <?php if ( ! $item['processing'] and ! $item['executing'] ): ?>
333 <!--h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'edit'), $this->baseUrl); ?>"><?php _e('Edit', 'wp_all_export_plugin'); ?></a></h2-->
334 <h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'update'), $this->baseUrl); ?>"><?php _e('Run Export', 'wp_all_export_plugin'); ?></a></h2>
335 <?php elseif ($item['processing']) : ?>
336 <h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl); ?>"><?php _e('Cancel Cron', 'wp_all_export_plugin'); ?></a></h2>
337 <?php elseif ($item['executing']) : ?>
338 <h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl); ?>"><?php _e('Cancel', 'wp_all_export_plugin'); ?></a></h2>
339 <?php endif; ?>
340 </td>
341 <?php
342 break;
343 default:
344 ?>
345 <td>
346 <?php do_action('pmxe_manage_imports_column', $column_id, $item); ?>
347 </td>
348 <?php
349 break;
350 endswitch;
351 ?>
352 <?php endforeach; ?>
353 </tr>
354 <?php endforeach; ?>
355 <?php endif ?>
356 </tbody>
357 </table>
358
359 <div class="tablenav">
360 <?php if ($page_links): ?><div class="tablenav-pages"><?php echo $page_links_html ?></div><?php endif ?>
361
362 <div class="alignleft actions">
363 <select name="bulk-action2">
364 <option value="" selected="selected"><?php _e('Bulk Actions', 'wp_all_export_plugin') ?></option>
365 <?php if ( empty($type) or 'trash' != $type): ?>
366 <option value="delete"><?php _e('Delete', 'wp_all_export_plugin') ?></option>
367 <?php else: ?>
368 <option value="restore"><?php _e('Restore', 'wp_all_export_plugin')?></option>
369 <option value="delete"><?php _e('Delete Permanently', 'wp_all_export_plugin')?></option>
370 <?php endif ?>
371 </select>
372 <input type="submit" value="<?php esc_attr_e('Apply', 'wp_all_export_plugin') ?>" name="doaction2" id="doaction2" class="button-secondary action" />
373 </div>
374 </div>
375 <div class="clear"></div>
376
377 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php _e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
378
379 </form>