Export WordPress data to XML/CSV - Version 1.0.6

Version Description

  • added new filters 'wp_all_export_is_wrap_value_into_cdata', 'wp_all_export_add_before_element', 'wp_all_export_add_after_element'
  • added 'WPML Translation ID' element to available data
  • modified preview to show first 10 records
  • fixed csv export with non comma delimiter
  • fixed conflict with WP Google Maps Pro plugin
Download this release

Release Info

Developer soflyy
Plugin Icon 128x128 Export WordPress data to XML/CSV
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

actions/{wp_ajax_export_available_rules.php → wp_ajax_wpae_available_rules.php} RENAMED
@@ -1,6 +1,6 @@
1
<?php
2
3
- function pmxe_wp_ajax_export_available_rules(){
4
5
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
6
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
1
<?php
2
3
+ function pmxe_wp_ajax_wpae_available_rules(){
4
5
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
6
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
actions/{wp_ajax_export_filtering.php → wp_ajax_wpae_filtering.php} RENAMED
@@ -1,6 +1,6 @@
1
<?php
2
3
- function pmxe_wp_ajax_export_filtering(){
4
5
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
6
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
1
<?php
2
3
+ function pmxe_wp_ajax_wpae_filtering(){
4
5
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
6
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
actions/{wp_ajax_export_filtering_count.php → wp_ajax_wpae_filtering_count.php} RENAMED
@@ -1,6 +1,6 @@
1
<?php
2
3
- function pmxe_wp_ajax_export_filtering_count(){
4
5
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
6
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
@@ -196,7 +196,7 @@ function pmxe_wp_ajax_export_filtering_count(){
196
<?php if ($found_records > 0) :?>
197
<?php if (XmlExportEngine::$is_user_export || XmlExportEngine::$is_comment_export): ?>
198
<h3><span class="matches_count"><?php echo $found_records; ?></span> <strong><?php echo wp_all_export_get_cpt_name($cpt, $found_records); ?></strong> can be exported</h3>
199
- <h4><?php printf(__('Upgrade to the professional edition of WP All Export to export %s.', 'wp_all_export_plugin'), wp_all_export_get_cpt_name($cpt)); ?></h4>
200
<?php else:?>
201
<h3><span class="matches_count"><?php echo $found_records; ?></span> <strong><?php echo wp_all_export_get_cpt_name($cpt, $found_records); ?></strong> will be exported</h3>
202
<h4><?php _e("Continue to configure and run your export.", "wp_all_export_plugin"); ?></h4>
1
<?php
2
3
+ function pmxe_wp_ajax_wpae_filtering_count(){
4
5
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
6
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
196
<?php if ($found_records > 0) :?>
197
<?php if (XmlExportEngine::$is_user_export || XmlExportEngine::$is_comment_export): ?>
198
<h3><span class="matches_count"><?php echo $found_records; ?></span> <strong><?php echo wp_all_export_get_cpt_name($cpt, $found_records); ?></strong> can be exported</h3>
199
+ <h4><?php printf(__('Upgrade to the Pro edition of WP All Export to export %s.', 'wp_all_export_plugin'), wp_all_export_get_cpt_name($cpt)); ?></h4>
200
<?php else:?>
201
<h3><span class="matches_count"><?php echo $found_records; ?></span> <strong><?php echo wp_all_export_get_cpt_name($cpt, $found_records); ?></strong> will be exported</h3>
202
<h4><?php _e("Continue to configure and run your export.", "wp_all_export_plugin"); ?></h4>
actions/{wp_ajax_export_preview.php → wp_ajax_wpae_preview.php} RENAMED
@@ -2,7 +2,7 @@
2
/**
3
* AJAX action for preview export row
4
*/
5
- function pmxe_wp_ajax_export_preview(){
6
7
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
8
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
@@ -85,6 +85,8 @@ function pmxe_wp_ajax_export_preview(){
85
?>
86
87
<div id="post-preview" class="wpallexport-preview">
88
89
<div class="wpallexport-preview-content">
90
2
/**
3
* AJAX action for preview export row
4
*/
5
+ function pmxe_wp_ajax_wpae_preview(){
6
7
if ( ! check_ajax_referer( 'wp_all_export_secure', 'security', false )){
8
exit( json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))) );
85
?>
86
87
<div id="post-preview" class="wpallexport-preview">
88
+
89
+ <p class="wpallexport-preview-title"><?php echo sprintf("Preview first 10 %s", wp_all_export_get_cpt_name($exportOptions['cpt'], 10)); ?></p>
90
91
<div class="wpallexport-preview-content">
92
actions/wp_ajax_wpallexport.php CHANGED
@@ -48,11 +48,11 @@ function pmxe_wp_ajax_wpallexport(){
48
{
49
if (XmlExportEngine::$is_user_export)
50
{
51
- exit( json_encode(array('html' => __('Upgrade to the professional edition of WP All Export to export users.', 'wp_all_export_plugin'))) );
52
}
53
elseif(XmlExportEngine::$is_comment_export)
54
{
55
- exit( json_encode(array('html' => __('Upgrade to the professional edition of WP All Export to export comments.', 'wp_all_export_plugin'))) );
56
}
57
else
58
{
@@ -74,11 +74,11 @@ function pmxe_wp_ajax_wpallexport(){
74
75
if (in_array('users', $exportOptions['cpt']) or in_array('shop_customer', $exportOptions['cpt']))
76
{
77
- exit( json_encode(array('html' => __('Upgrade to the professional edition of WP All Export to export users.', 'wp_all_export_plugin'))) );
78
}
79
elseif(in_array('comments', $exportOptions['cpt']))
80
{
81
- exit( json_encode(array('html' => __('Upgrade to the professional edition of WP All Export to export comments.', 'wp_all_export_plugin'))) );
82
}
83
else
84
{
@@ -195,7 +195,7 @@ function pmxe_wp_ajax_wpallexport(){
195
{
196
$attach_id = wp_insert_attachment( $attachment_data, PMXE_Plugin::$session->file );
197
}
198
- elseif($export->options['creata_a_new_export_file'] and ( ! XmlExportWooCommerceOrder::$is_active || $export->options['export_type'] != 'specific') )
199
{
200
$attach_id = wp_insert_attachment( $attachment_data, PMXE_Plugin::$session->file );
201
}
48
{
49
if (XmlExportEngine::$is_user_export)
50
{
51
+ exit( json_encode(array('html' => __('Upgrade to the Pro edition of WP All Export to export users.', 'wp_all_export_plugin'))) );
52
}
53
elseif(XmlExportEngine::$is_comment_export)
54
{
55
+ exit( json_encode(array('html' => __('Upgrade to the Pro edition of WP All Export to export comments.', 'wp_all_export_plugin'))) );
56
}
57
else
58
{
74
75
if (in_array('users', $exportOptions['cpt']) or in_array('shop_customer', $exportOptions['cpt']))
76
{
77
+ exit( json_encode(array('html' => __('Upgrade to the Pro edition of WP All Export to export users.', 'wp_all_export_plugin'))) );
78
}
79
elseif(in_array('comments', $exportOptions['cpt']))
80
{
81
+ exit( json_encode(array('html' => __('Upgrade to the Pro edition of WP All Export to export comments.', 'wp_all_export_plugin'))) );
82
}
83
else
84
{
195
{
196
$attach_id = wp_insert_attachment( $attachment_data, PMXE_Plugin::$session->file );
197
}
198
+ elseif($export->options['creata_a_new_export_file'] )
199
{
200
$attach_id = wp_insert_attachment( $attachment_data, PMXE_Plugin::$session->file );
201
}
classes/XMLWriter.php CHANGED
@@ -27,9 +27,11 @@ class PMXE_XMLWriter extends XMLWriter
27
}
28
}
29
30
- public function writeData( $value )
31
{
32
- if (empty($value) or is_numeric($value)) $this->text($value); else $this->writeCData($value);
33
}
34
35
}
27
}
28
}
29
30
+ public function writeData( $value, $element_name )
31
{
32
+ $is_wrap_into_cdata = ! ( empty($value) or is_numeric($value) );
33
+ $wrap_value_into_cdata = apply_filters('wp_all_export_is_wrap_value_into_cdata', $is_wrap_into_cdata, $value, $element_name);
34
+ if ( $wrap_value_into_cdata === false ) $this->text($value); else $this->writeCData($value);
35
}
36
37
}
classes/wpallimport.php CHANGED
@@ -160,11 +160,63 @@ final class PMXE_Wpallimport
160
'export_id' => $export->id
161
);
162
163
- if ( in_array('product', $exportOptions['cpt']) and class_exists('PMWI_Plugin'))
164
- {
165
- $default = PMWI_Plugin::get_default_import_options();
166
-
167
- self::$templateOptions = array_replace_recursive(self::$templateOptions, $default);
168
169
self::$templateOptions['_virtual'] = 1;
170
self::$templateOptions['_downloadable'] = 1;
@@ -172,17 +224,16 @@ final class PMXE_Wpallimport
172
self::$templateOptions['disable_auto_sku_generation'] = 1;
173
}
174
175
- if ( in_array('shop_order', $exportOptions['cpt']) and class_exists('PMWI_Plugin'))
176
{
177
self::$templateOptions['update_all_data'] = 'no';
178
self::$templateOptions['is_update_status'] = 0;
179
self::$templateOptions['is_update_dates'] = 0;
180
self::$templateOptions['is_update_excerpt'] = 0;
181
182
- $default = PMWI_Plugin::get_default_import_options();
183
-
184
- self::$templateOptions['pmwi_order'] = $default['pmwi_order'];
185
-
186
self::$templateOptions['pmwi_order']['is_update_billing_details'] = 0;
187
self::$templateOptions['pmwi_order']['is_update_shipping_details'] = 0;
188
self::$templateOptions['pmwi_order']['is_update_payment'] = 0;
@@ -193,7 +244,28 @@ final class PMXE_Wpallimport
193
self::$templateOptions['pmwi_order']['is_update_shipping'] = 0;
194
self::$templateOptions['pmwi_order']['is_update_taxes'] = 0;
195
self::$templateOptions['pmwi_order']['is_update_refunds'] = 0;
196
- self::$templateOptions['pmwi_order']['is_update_total'] = 0;
197
}
198
199
if ( XmlExportEngine::$is_user_export )
160
'export_id' => $export->id
161
);
162
163
+ if ( in_array('product', $exportOptions['cpt']) )
164
+ {
165
+ $default = array(
166
+ 'is_multiple_product_type' => 'yes',
167
+ 'multiple_product_type' => 'simple',
168
+ 'is_product_virtual' => 'no',
169
+ 'is_product_downloadable' => 'no',
170
+ 'is_product_enabled' => 'yes',
171
+ 'is_variation_enabled' => 'yes',
172
+ 'is_product_featured' => 'no',
173
+ 'is_product_visibility' => 'visible',
174
+ 'is_multiple_product_tax_status' => 'yes',
175
+ 'multiple_product_tax_status' => 'none',
176
+ 'is_multiple_product_tax_class' => 'yes',
177
+ 'is_product_manage_stock' => 'no',
178
+ 'product_stock_status' => 'auto',
179
+ 'product_allow_backorders' => 'no',
180
+ 'product_sold_individually' => 'no',
181
+ 'is_multiple_product_shipping_class' => 'yes',
182
+ 'is_multiple_grouping_product' => 'yes',
183
+ 'is_product_enable_reviews' => 'no',
184
+ 'single_sale_price_dates_from' => 'now',
185
+ 'single_sale_price_dates_to' => 'now',
186
+ 'product_files_delim' => ',',
187
+ 'product_files_names_delim' => ',',
188
+ 'matching_parent' => 'auto',
189
+ 'parent_indicator' => 'custom field',
190
+ 'missing_records_stock_status' => 0,
191
+ 'is_variable_sale_price_shedule' => 0,
192
+ 'is_variable_product_virtual' => 'no',
193
+ 'is_variable_product_manage_stock' => 'no',
194
+ 'is_multiple_variable_product_shipping_class' => 'yes',
195
+ 'is_multiple_variable_product_tax_class' => 'yes',
196
+ 'multiple_variable_product_tax_class' => 'parent',
197
+ 'variable_stock_status' => 'instock',
198
+ 'variable_allow_backorders' => 'no',
199
+ 'is_variable_product_downloadable' => 'no',
200
+ 'variable_product_files_delim' => ',',
201
+ 'variable_product_files_names_delim' => ',',
202
+ 'is_variable_product_enabled' => 'yes',
203
+ 'first_is_parent' => 'yes',
204
+ 'default_attributes_type' => 'first',
205
+ 'disable_sku_matching' => 1,
206
+ 'disable_prepare_price' => 1,
207
+ 'convert_decimal_separator' => 1,
208
+ 'grouping_indicator' => 'xpath',
209
+ 'is_update_product_type' => 1,
210
+ 'make_simple_product' => 1,
211
+ 'single_product_regular_price_adjust_type' => '%',
212
+ 'single_product_sale_price_adjust_type' => '%',
213
+ 'is_update_attributes' => 1,
214
+ 'update_attributes_logic' => 'full_update',
215
+ 'is_variation_product_manage_stock' => 'no',
216
+ 'variation_stock_status' => 'auto'
217
+ );
218
+
219
+ self::$templateOptions = array_replace_recursive(self::$templateOptions, $default);
220
221
self::$templateOptions['_virtual'] = 1;
222
self::$templateOptions['_downloadable'] = 1;
224
self::$templateOptions['disable_auto_sku_generation'] = 1;
225
}
226
227
+ if ( in_array('shop_order', $exportOptions['cpt']) )
228
{
229
self::$templateOptions['update_all_data'] = 'no';
230
self::$templateOptions['is_update_status'] = 0;
231
self::$templateOptions['is_update_dates'] = 0;
232
self::$templateOptions['is_update_excerpt'] = 0;
233
234
+ // $default = PMWI_Plugin::get_default_import_options();
235
+ // self::$templateOptions['pmwi_order'] = $default['pmwi_order'];
236
+ self::$templateOptions['pmwi_order'] = array();
237
self::$templateOptions['pmwi_order']['is_update_billing_details'] = 0;
238
self::$templateOptions['pmwi_order']['is_update_shipping_details'] = 0;
239
self::$templateOptions['pmwi_order']['is_update_payment'] = 0;
244
self::$templateOptions['pmwi_order']['is_update_shipping'] = 0;
245
self::$templateOptions['pmwi_order']['is_update_taxes'] = 0;
246
self::$templateOptions['pmwi_order']['is_update_refunds'] = 0;
247
+ self::$templateOptions['pmwi_order']['is_update_total'] = 0;
248
+ self::$templateOptions['pmwi_order']['status'] = 'wc-pending';
249
+ self::$templateOptions['pmwi_order']['billing_source'] = 'existing';
250
+ self::$templateOptions['pmwi_order']['billing_source_match_by'] = 'username';
251
+ self::$templateOptions['pmwi_order']['shipping_source'] = 'copy';
252
+ self::$templateOptions['pmwi_order']['products_repeater_mode'] = 'csv';
253
+ self::$templateOptions['pmwi_order']['products_repeater_mode_separator'] = '|';
254
+ self::$templateOptions['pmwi_order']['products_source'] = 'existing';
255
+ self::$templateOptions['pmwi_order']['fees_repeater_mode'] = 'csv';
256
+ self::$templateOptions['pmwi_order']['fees_repeater_mode_separator'] = '|';
257
+ self::$templateOptions['pmwi_order']['coupons_repeater_mode'] = 'csv';
258
+ self::$templateOptions['pmwi_order']['coupons_repeater_mode_separator'] = '|';
259
+ self::$templateOptions['pmwi_order']['shipping_repeater_mode'] = 'csv';
260
+ self::$templateOptions['pmwi_order']['shipping_repeater_mode_separator'] = '|';
261
+ self::$templateOptions['pmwi_order']['taxes_repeater_mode'] = 'csv';
262
+ self::$templateOptions['pmwi_order']['taxes_repeater_mode_separator'] = '|';
263
+ self::$templateOptions['pmwi_order']['order_total_logic'] = 'auto';
264
+ self::$templateOptions['pmwi_order']['order_refund_date'] = 'now';
265
+ self::$templateOptions['pmwi_order']['order_refund_issued_source'] = 'existing';
266
+ self::$templateOptions['pmwi_order']['order_refund_issued_match_by'] = 'username';
267
+ self::$templateOptions['pmwi_order']['notes_repeater_mode'] = 'csv';
268
+ self::$templateOptions['pmwi_order']['notes_repeater_mode_separator'] = '|';
269
}
270
271
if ( XmlExportEngine::$is_user_export )
controllers/admin/export.php CHANGED
@@ -193,6 +193,13 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
193
194
}
195
196
PMXE_Plugin::$session->save_data();
197
198
$this->data['post'] =& $post;
193
194
}
195
196
+ $max_input_vars = @ini_get('max_input_vars');
197
+
198
+ if(ctype_digit($max_input_vars) && count($_POST, COUNT_RECURSIVE) >= $max_input_vars)
199
+ {
200
+ $this->errors->add('form-validation', sprintf(__('You\'ve reached your max_input_vars limit of %d. Please increase this.', 'wp_all_export_plugin'), $max_input_vars));
201
+ }
202
+
203
PMXE_Plugin::$session->save_data();
204
205
$this->data['post'] =& $post;
filters/wpallexport_custom_types.php CHANGED
@@ -4,13 +4,13 @@ function pmxe_wpallexport_custom_types($custom_types)
4
{
5
if (class_exists('WooCommerce'))
6
{
7
- if ( ! empty($custom_types['product'])) $custom_types['product']->labels->name = __('WooCommerce Products','wp_all_export_plugin');
8
- if ( ! empty($custom_types['shop_order'])) $custom_types['shop_order']->labels->name = __('WooCommerce Orders','wp_all_export_plugin');
9
- if ( ! empty($custom_types['shop_coupon'])) unset($custom_types['shop_coupon']);
10
if ( ! empty($custom_types['product_variation'])) unset($custom_types['product_variation']);
11
if ( ! empty($custom_types['shop_order_refund'])) unset($custom_types['shop_order_refund']);
12
13
- $order = array('shop_order', 'shop_customer', 'product');
14
15
$ordered_custom_types = array();
16
@@ -23,7 +23,7 @@ function pmxe_wpallexport_custom_types($custom_types)
23
{
24
$ordered_custom_types['shop_customer'] = new stdClass();
25
$ordered_custom_types['shop_customer']->labels = new stdClass();
26
- $ordered_custom_types['shop_customer']->labels->name = __('WooCommerce Customers','wp_all_export_plugin');
27
}
28
else
29
{
4
{
5
if (class_exists('WooCommerce'))
6
{
7
+ if ( ! empty($custom_types['product'])) $custom_types['product']->labels->name = __('Products','wp_all_export_plugin');
8
+ if ( ! empty($custom_types['shop_order'])) $custom_types['shop_order']->labels->name = __('Orders','wp_all_export_plugin');
9
+ if ( ! empty($custom_types['shop_coupon'])) $custom_types['shop_coupon']->labels->name = __('Coupons','wp_all_export_plugin');
10
if ( ! empty($custom_types['product_variation'])) unset($custom_types['product_variation']);
11
if ( ! empty($custom_types['shop_order_refund'])) unset($custom_types['shop_order_refund']);
12
13
+ $order = array('shop_order', 'shop_coupon', 'shop_customer', 'product');
14
15
$ordered_custom_types = array();
16
23
{
24
$ordered_custom_types['shop_customer'] = new stdClass();
25
$ordered_custom_types['shop_customer']->labels = new stdClass();
26
+ $ordered_custom_types['shop_customer']->labels->name = __('Customers','wp_all_export_plugin');
27
}
28
else
29
{
helpers/wp_all_export_generate_export_file.php CHANGED
@@ -15,7 +15,7 @@ if ( ! function_exists('wp_all_export_generate_export_file') )
15
16
if ( ! $export->isEmpty())
17
{
18
- if ( $export->options['creata_a_new_export_file'] and ( ! XmlExportWooCommerceOrder::$is_active || $export->options['export_type'] != 'specific') )
19
{
20
$export_file_name = sanitize_file_name($export->friendly_name) . ' - ' . ($export->iteration + 1) . '.' . $export->options['export_to'];
21
}
15
16
if ( ! $export->isEmpty())
17
{
18
+ if ( $export->options['creata_a_new_export_file'] )
19
{
20
$export_file_name = sanitize_file_name($export->friendly_name) . ' - ' . ($export->iteration + 1) . '.' . $export->options['export_to'];
21
}
libraries/XmlCsvExport.php CHANGED
@@ -61,9 +61,8 @@ final Class XmlCsvExport
61
{
62
foreach ( XmlExportEngine::$exportQuery->results as $user ) :
63
$articles[] = XmlExportUser::prepare_data( $user, false, $acfs, $implode_delimiter, $preview );
64
- $articles = apply_filters('wp_all_export_csv_rows', $articles, XmlExportEngine::$exportOptions, XmlExportEngine::$exportID);
65
- if ($preview) break;
66
- do_action('pmxe_exported_post', $user->ID, XmlExportEngine::$exportRecord );
67
endforeach;
68
}
69
elseif ( XmlExportEngine::$is_comment_export ) // exporting comments
@@ -81,9 +80,8 @@ final Class XmlCsvExport
81
82
foreach ( $comments as $comment ) :
83
$articles[] = XmlExportComment::prepare_data( $comment, false, $implode_delimiter, $preview );
84
- $articles = apply_filters('wp_all_export_csv_rows', $articles, XmlExportEngine::$exportOptions, XmlExportEngine::$exportID);
85
- if ($preview) break;
86
- do_action('pmxe_exported_post', $comment->comment_ID, XmlExportEngine::$exportRecord );
87
endforeach;
88
}
89
else // exporting custom post types
@@ -92,9 +90,8 @@ final Class XmlCsvExport
92
XmlExportEngine::$exportQuery->the_post();
93
$record = get_post( get_the_ID() );
94
$articles[] = XmlExportCpt::prepare_data( $record, false, $acfs, $woo, $woo_order, $implode_delimiter, $preview );
95
- $articles = apply_filters('wp_all_export_csv_rows', $articles, XmlExportEngine::$exportOptions, XmlExportEngine::$exportID);
96
- if ($preview) break;
97
- do_action('pmxe_exported_post', $record->ID, XmlExportEngine::$exportRecord );
98
endwhile;
99
wp_reset_postdata();
100
}
@@ -197,11 +194,9 @@ final Class XmlCsvExport
197
$xmlWriter->endElement(); // end post
198
199
// add additional information after each node
200
- self::after_xml_node( $xmlWriter, $user->ID);
201
-
202
- if ($preview) break;
203
204
- do_action('pmxe_exported_post', $user->ID, XmlExportEngine::$exportRecord );
205
206
endforeach;
207
@@ -235,11 +230,9 @@ final Class XmlCsvExport
235
$xmlWriter->endElement(); // end post
236
237
// add additional information after each node
238
- self::after_xml_node( $xmlWriter, $comment->comment_ID);
239
-
240
- if ($preview) break;
241
242
- do_action('pmxe_exported_post', $comment->comment_ID, XmlExportEngine::$exportRecord );
243
244
endforeach;
245
}
@@ -265,11 +258,9 @@ final Class XmlCsvExport
265
$xmlWriter->endElement(); // end post
266
267
// add additional information after each node
268
- self::after_xml_node( $xmlWriter, $record->ID);
269
-
270
- if ($preview) break;
271
272
- do_action('pmxe_exported_post', $record->ID, XmlExportEngine::$exportRecord );
273
274
endwhile;
275
wp_reset_postdata();
@@ -298,7 +289,7 @@ final Class XmlCsvExport
298
foreach ($additional_data as $key => $value)
299
{
300
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
301
- $xmlWriter->writeData($value);
302
$xmlWriter->endElement();
303
}
304
}
@@ -316,7 +307,7 @@ final Class XmlCsvExport
316
foreach ($additional_data as $key => $value)
317
{
318
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
319
- $xmlWriter->writeData($value);
320
$xmlWriter->endElement();
321
}
322
}
@@ -333,7 +324,7 @@ final Class XmlCsvExport
333
foreach ($add_before_node as $key => $value)
334
{
335
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
336
- $xmlWriter->writeData($value);
337
$xmlWriter->endElement();
338
}
339
}
@@ -348,7 +339,7 @@ final Class XmlCsvExport
348
foreach ($add_after_node as $key => $value)
349
{
350
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
351
- $xmlWriter->writeData($value);
352
$xmlWriter->endElement();
353
}
354
}
@@ -523,7 +514,7 @@ final Class XmlCsvExport
523
524
$in = fopen($file, 'r');
525
526
- $clear_old_headers = fgetcsv($in);
527
528
fclose($in);
529
@@ -532,7 +523,7 @@ final Class XmlCsvExport
532
foreach ($clear_old_headers as $i => $header)
533
{
534
$header = str_replace("'", "", str_replace('"', "", str_replace(chr(0xEF).chr(0xBB).chr(0xBF), "", $header)));
535
-
536
if ( ! in_array($header, $old_headers))
537
{
538
$old_headers[] = $header;
@@ -558,6 +549,7 @@ final Class XmlCsvExport
558
}
559
560
$is_update_headers = false;
561
foreach ($headers as $header)
562
{
563
if ( ! in_array($header, $old_headers))
@@ -568,10 +560,10 @@ final Class XmlCsvExport
568
}
569
570
if ($is_update_headers)
571
- {
572
-
573
- $headers = $old_headers + $headers;
574
575
$tmp_file = str_replace(basename($file), 'iteration_' . basename($file), $file);
576
577
copy($file, $tmp_file);
@@ -582,23 +574,23 @@ final Class XmlCsvExport
582
583
if ( XmlExportEngine::$exportOptions['include_bom'] )
584
{
585
- fputcsv($out, chr(0xEF).chr(0xBB).chr(0xBF) . array_map(array('XmlCsvExport', '_get_valid_header_name'), $headers));
586
}
587
else
588
{
589
- fputcsv($out, array_map(array('XmlCsvExport', '_get_valid_header_name'), $headers));
590
- }
591
592
$exclude_old_headers = fgetcsv($in);
593
594
while ( ! feof($in) ) {
595
$data = fgetcsv($in, 0, XmlExportEngine::$exportOptions['delimiter']);
596
if ( empty($data) ) continue;
597
- $data_assoc = array_combine($old_headers, array_values($data));
598
$line = array();
599
- foreach ($headers as $header) {
600
$line[$header] = ( isset($data_assoc[$header]) ) ? $data_assoc[$header] : '';
601
- }
602
fputcsv($out, $line, XmlExportEngine::$exportOptions['delimiter']);
603
}
604
fclose($in);
@@ -632,7 +624,7 @@ final Class XmlCsvExport
632
633
}
634
else
635
- {
636
if ( empty(PMXE_Plugin::$session->file) ){
637
638
// generate export file name
@@ -688,7 +680,8 @@ final Class XmlCsvExport
688
'cc_name' => array()
689
);
690
691
- $available_data = $engine->init_available_data();
692
$available_sections = apply_filters("wp_all_export_available_sections", $engine->get('available_sections'));
693
694
foreach ($available_sections as $slug => $section)
@@ -704,6 +697,7 @@ final Class XmlCsvExport
704
$auto_generate['cc_php'][] = 0;
705
$auto_generate['cc_code'][] = '';
706
$auto_generate['cc_sql'][] = '';
707
$auto_generate['cc_type'][] = is_array($field) ? $field['type'] : $slug;
708
$auto_generate['cc_options'][] = '';
709
$auto_generate['cc_value'][] = is_array($field) ? $field['label'] : $field;
@@ -712,6 +706,26 @@ final Class XmlCsvExport
712
}
713
}
714
}
715
return $auto_generate;
716
}
717
}
61
{
62
foreach ( XmlExportEngine::$exportQuery->results as $user ) :
63
$articles[] = XmlExportUser::prepare_data( $user, false, $acfs, $implode_delimiter, $preview );
64
+ $articles = apply_filters('wp_all_export_csv_rows', $articles, XmlExportEngine::$exportOptions, XmlExportEngine::$exportID);
65
+ if ( ! $preview) do_action('pmxe_exported_post', $user->ID, XmlExportEngine::$exportRecord );
66
endforeach;
67
}
68
elseif ( XmlExportEngine::$is_comment_export ) // exporting comments
80
81
foreach ( $comments as $comment ) :
82
$articles[] = XmlExportComment::prepare_data( $comment, false, $implode_delimiter, $preview );
83
+ $articles = apply_filters('wp_all_export_csv_rows', $articles, XmlExportEngine::$exportOptions, XmlExportEngine::$exportID);
84
+ if ( ! $preview) do_action('pmxe_exported_post', $comment->comment_ID, XmlExportEngine::$exportRecord );
85
endforeach;
86
}
87
else // exporting custom post types
90
XmlExportEngine::$exportQuery->the_post();
91
$record = get_post( get_the_ID() );
92
$articles[] = XmlExportCpt::prepare_data( $record, false, $acfs, $woo, $woo_order, $implode_delimiter, $preview );
93
+ $articles = apply_filters('wp_all_export_csv_rows', $articles, XmlExportEngine::$exportOptions, XmlExportEngine::$exportID);
94
+ if ( ! $preview) do_action('pmxe_exported_post', $record->ID, XmlExportEngine::$exportRecord );
95
endwhile;
96
wp_reset_postdata();
97
}
194
$xmlWriter->endElement(); // end post
195
196
// add additional information after each node
197
+ self::after_xml_node( $xmlWriter, $user->ID);
198
199
+ if ( ! $preview) do_action('pmxe_exported_post', $user->ID, XmlExportEngine::$exportRecord );
200
201
endforeach;
202
230
$xmlWriter->endElement(); // end post
231
232
// add additional information after each node
233
+ self::after_xml_node( $xmlWriter, $comment->comment_ID);
234
235
+ if ( ! $preview) do_action('pmxe_exported_post', $comment->comment_ID, XmlExportEngine::$exportRecord );
236
237
endforeach;
238
}
258
$xmlWriter->endElement(); // end post
259
260
// add additional information after each node
261
+ self::after_xml_node( $xmlWriter, $record->ID);
262
263
+ if ( ! $preview) do_action('pmxe_exported_post', $record->ID, XmlExportEngine::$exportRecord );
264
265
endwhile;
266
wp_reset_postdata();
289
foreach ($additional_data as $key => $value)
290
{
291
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
292
+ $xmlWriter->writeData($value, preg_replace('/[^a-z0-9_-]/i', '', $key));
293
$xmlWriter->endElement();
294
}
295
}
307
foreach ($additional_data as $key => $value)
308
{
309
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
310
+ $xmlWriter->writeData($value, preg_replace('/[^a-z0-9_-]/i', '', $key));
311
$xmlWriter->endElement();
312
}
313
}
324
foreach ($add_before_node as $key => $value)
325
{
326
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
327
+ $xmlWriter->writeData($value, preg_replace('/[^a-z0-9_-]/i', '', $key));
328
$xmlWriter->endElement();
329
}
330
}
339
foreach ($add_after_node as $key => $value)
340
{
341
$xmlWriter->startElement(preg_replace('/[^a-z0-9_-]/i', '', $key));
342
+ $xmlWriter->writeData($value, preg_replace('/[^a-z0-9_-]/i', '', $key));
343
$xmlWriter->endElement();
344
}
345
}
514
515
$in = fopen($file, 'r');
516
517
+ $clear_old_headers = fgetcsv($in, 0, XmlExportEngine::$exportOptions['delimiter']);
518
519
fclose($in);
520
523
foreach ($clear_old_headers as $i => $header)
524
{
525
$header = str_replace("'", "", str_replace('"', "", str_replace(chr(0xEF).chr(0xBB).chr(0xBF), "", $header)));
526
+
527
if ( ! in_array($header, $old_headers))
528
{
529
$old_headers[] = $header;
549
}
550
551
$is_update_headers = false;
552
+
553
foreach ($headers as $header)
554
{
555
if ( ! in_array($header, $old_headers))
560
}
561
562
if ($is_update_headers)
563
+ {
564
565
+ $headers = $old_headers + $headers;
566
+
567
$tmp_file = str_replace(basename($file), 'iteration_' . basename($file), $file);
568
569
copy($file, $tmp_file);
574
575
if ( XmlExportEngine::$exportOptions['include_bom'] )
576
{
577
+ fputcsv($out, chr(0xEF).chr(0xBB).chr(0xBF) . array_map(array('XmlCsvExport', '_get_valid_header_name'), $headers), XmlExportEngine::$exportOptions['delimiter']);
578
}
579
else
580
{
581
+ fputcsv($out, array_map(array('XmlCsvExport', '_get_valid_header_name'), $headers), XmlExportEngine::$exportOptions['delimiter']);
582
+ }
583
584
$exclude_old_headers = fgetcsv($in);
585
586
while ( ! feof($in) ) {
587
$data = fgetcsv($in, 0, XmlExportEngine::$exportOptions['delimiter']);
588
if ( empty($data) ) continue;
589
+ $data_assoc = array_combine($old_headers, array_values($data));
590
$line = array();
591
+ foreach ($headers as $header) {
592
$line[$header] = ( isset($data_assoc[$header]) ) ? $data_assoc[$header] : '';
593
+ }
594
fputcsv($out, $line, XmlExportEngine::$exportOptions['delimiter']);
595
}
596
fclose($in);
624
625
}
626
else
627
+ {
628
if ( empty(PMXE_Plugin::$session->file) ){
629
630
// generate export file name
680
'cc_name' => array()
681
);
682
683
+ $available_data = $engine->init_available_data();
684
+
685
$available_sections = apply_filters("wp_all_export_available_sections", $engine->get('available_sections'));
686
687
foreach ($available_sections as $slug => $section)
697
$auto_generate['cc_php'][] = 0;
698
$auto_generate['cc_code'][] = '';
699
$auto_generate['cc_sql'][] = '';
700
+ $auto_generate['cc_settings'][] = '';
701
$auto_generate['cc_type'][] = is_array($field) ? $field['type'] : $slug;
702
$auto_generate['cc_options'][] = '';
703
$auto_generate['cc_value'][] = is_array($field) ? $field['label'] : $field;
706
}
707
}
708
}
709
+
710
+ if ( XmlExportWooCommerceOrder::$is_active ) {
711
+ foreach (XmlExportWooCommerceOrder::$order_sections as $slug => $section) {
712
+ if ( ! empty($section['meta']) ) {
713
+ foreach ($section['meta'] as $cur_meta_key => $field) {
714
+ $auto_generate['ids'][] = 1;
715
+ $auto_generate['cc_label'][] = is_array($field) ? $field['label'] : $cur_meta_key;
716
+ $auto_generate['cc_php'][] = 0;
717
+ $auto_generate['cc_code'][] = '';
718
+ $auto_generate['cc_sql'][] = '';
719
+ $auto_generate['cc_settings'][] = '';
720
+ $auto_generate['cc_type'][] = is_array($field) ? $field['type'] : 'woo_order';
721
+ $auto_generate['cc_options'][] = is_array($field) ? $field['options'] : $slug;
722
+ $auto_generate['cc_value'][] = is_array($field) ? $field['label'] : $cur_meta_key;
723
+ $auto_generate['cc_name'][] = is_array($field) ? $field['name'] : $field;
724
+ }
725
+ }
726
+ }
727
+ }
728
+
729
return $auto_generate;
730
}
731
}
libraries/XmlExportACF.php CHANGED
@@ -248,17 +248,17 @@ if ( ! class_exists('XmlExportACF') )
248
249
$xmlWriter->beginElement($element_name_ns, $element_name, null);
250
$xmlWriter->startElement('address');
251
- $xmlWriter->writeData($localion_parts[0]);
252
$xmlWriter->endElement();
253
254
if (!empty($localion_parts[1])){
255
$coordinates = explode(",", $localion_parts[1]);
256
if (!empty($coordinates)){
257
$xmlWriter->startElement('lat');
258
- $xmlWriter->writeData($coordinates[0]);
259
$xmlWriter->endElement();
260
$xmlWriter->startElement('lng');
261
- $xmlWriter->writeData($coordinates[1]);
262
$xmlWriter->endElement();
263
}
264
}
@@ -321,7 +321,7 @@ if ( ! class_exists('XmlExportACF') )
321
if ( is_array($field_value) ){
322
foreach ($field_value as $key => $value) {
323
$xmlWriter->beginElement($element_name_ns, $key, null);
324
- $xmlWriter->writeData($value);
325
$xmlWriter->endElement();
326
}
327
}
@@ -353,13 +353,13 @@ if ( ! class_exists('XmlExportACF') )
353
{
354
$xmlWriter->beginElement($element_name_ns, $element_name, null);
355
$xmlWriter->startElement('address');
356
- $xmlWriter->writeData($field_value['address']);
357
$xmlWriter->endElement();
358
$xmlWriter->startElement('lat');
359
- $xmlWriter->writeData($field_value['lat']);
360
$xmlWriter->endElement();
361
$xmlWriter->startElement('lng');
362
- $xmlWriter->writeData($field_value['lng']);
363
$xmlWriter->endElement();
364
$xmlWriter->endElement();
365
}
@@ -490,7 +490,7 @@ if ( ! class_exists('XmlExportACF') )
490
if ($entry and !is_wp_error($entry))
491
{
492
$xmlWriter->startElement('term');
493
- $xmlWriter->writeData($entry->name);
494
$xmlWriter->endElement();
495
}
496
}
@@ -500,7 +500,7 @@ if ( ! class_exists('XmlExportACF') )
500
if ($entry)
501
{
502
$xmlWriter->startElement('term');
503
- $xmlWriter->writeData($entry->name);
504
$xmlWriter->endElement();
505
}
506
}
@@ -832,7 +832,7 @@ if ( ! class_exists('XmlExportACF') )
832
if ($is_xml_export)
833
{
834
$xmlWriter->beginElement($element_name_ns, $element_name, null);
835
- $xmlWriter->writeData($val);
836
$xmlWriter->endElement();
837
}
838
else
@@ -909,7 +909,7 @@ if ( ! class_exists('XmlExportACF') )
909
<input type="hidden" name="cc_options[]" value="<?php echo esc_html(serialize(array_merge($field, array('group_id' => ((!empty($group['ID'])) ? $group['ID'] : $group['id']) ))));?>"/>
910
<input type="hidden" name="cc_type[]" value="acf"/>
911
<input type="hidden" name="cc_value[]" value="<?php echo $field['name']; ?>"/>
912
- <input type="hidden" name="cc_name[]" value="<?php echo str_replace(" ", "_", $field['label']);?>"/>
913
<input type="hidden" name="cc_settings[]" value=""/>
914
</div>
915
</li>
@@ -945,8 +945,8 @@ if ( ! class_exists('XmlExportACF') )
945
?>
946
<option
947
value="acf"
948
- label="<?php echo $field['label'];?>"
949
- options="<?php echo $field_options; ?>"><?php echo $field['name'];?></option>
950
<?php
951
}
952
}
248
249
$xmlWriter->beginElement($element_name_ns, $element_name, null);
250
$xmlWriter->startElement('address');
251
+ $xmlWriter->writeData($localion_parts[0], 'address');
252
$xmlWriter->endElement();
253
254
if (!empty($localion_parts[1])){
255
$coordinates = explode(",", $localion_parts[1]);
256
if (!empty($coordinates)){
257
$xmlWriter->startElement('lat');
258
+ $xmlWriter->writeData($coordinates[0], 'lat');
259
$xmlWriter->endElement();
260
$xmlWriter->startElement('lng');
261
+ $xmlWriter->writeData($coordinates[1], 'lng');
262
$xmlWriter->endElement();
263
}
264
}
321
if ( is_array($field_value) ){
322
foreach ($field_value as $key => $value) {
323
$xmlWriter->beginElement($element_name_ns, $key, null);
324
+ $xmlWriter->writeData($value, $key);
325
$xmlWriter->endElement();
326
}
327
}
353
{
354
$xmlWriter->beginElement($element_name_ns, $element_name, null);
355
$xmlWriter->startElement('address');
356
+ $xmlWriter->writeData($field_value['address'], 'address');
357
$xmlWriter->endElement();
358
$xmlWriter->startElement('lat');
359
+ $xmlWriter->writeData($field_value['lat'], 'lat');
360
$xmlWriter->endElement();
361
$xmlWriter->startElement('lng');
362
+ $xmlWriter->writeData($field_value['lng'], 'lng');
363
$xmlWriter->endElement();
364
$xmlWriter->endElement();
365
}
490
if ($entry and !is_wp_error($entry))
491
{
492
$xmlWriter->startElement('term');
493
+ $xmlWriter->writeData($entry->name, 'term');
494
$xmlWriter->endElement();
495
}
496
}
500
if ($entry)
501
{
502
$xmlWriter->startElement('term');
503
+ $xmlWriter->writeData($entry->name, 'term');
504
$xmlWriter->endElement();
505
}
506
}
832
if ($is_xml_export)
833
{
834
$xmlWriter->beginElement($element_name_ns, $element_name, null);
835
+ $xmlWriter->writeData($val, $element_name);
836
$xmlWriter->endElement();
837
}
838
else
909
<input type="hidden" name="cc_options[]" value="<?php echo esc_html(serialize(array_merge($field, array('group_id' => ((!empty($group['ID'])) ? $group['ID'] : $group['id']) ))));?>"/>
910
<input type="hidden" name="cc_type[]" value="acf"/>
911
<input type="hidden" name="cc_value[]" value="<?php echo $field['name']; ?>"/>
912
+ <input type="hidden" name="cc_name[]" value="<?php echo $field['label'];?>"/>
913
<input type="hidden" name="cc_settings[]" value=""/>
914
</div>
915
</li>
945
?>
946
<option
947
value="acf"
948
+ label="<?php echo $field['name'];?>"
949
+ options="<?php echo $field_options; ?>"><?php echo $field['label'];?></option>
950
<?php
951
}
952
}
libraries/XmlExportComment.php CHANGED
@@ -172,12 +172,11 @@ if ( ! class_exists('XmlExportComment') )
172
173
if ( version_compare($wp_version, '4.2.0', '>=') )
174
{
175
- $commentsQuery = new WP_Comment_Query( array( 'orderby' => 'comment_ID', 'order' => 'ASC', 'number' => 10, 'count' => true));
176
- $comments = $commentsQuery->get_comments();
177
}
178
else
179
{
180
- $comments = get_comments( array( 'orderby' => 'comment_ID', 'order' => 'ASC', 'number' => 10, 'count' => true));
181
}
182
183
if ( ! empty( $comments ) ) {
172
173
if ( version_compare($wp_version, '4.2.0', '>=') )
174
{
175
+ $comments = XmlExportEngine::$exportQuery->get_comments();
176
}
177
else
178
{
179
+ $comments = XmlExportEngine::$exportQuery;
180
}
181
182
if ( ! empty( $comments ) ) {
libraries/XmlExportCpt.php CHANGED
@@ -394,7 +394,7 @@ final class XmlExportCpt
394
if ($xmlWriter and XmlExportEngine::$exportOptions['export_to'] == 'xml')
395
{
396
$xmlWriter->beginElement($element_name_ns, 'parent_id', null);
397
- $xmlWriter->writeData($article['parent_id']);
398
$xmlWriter->endElement();
399
}
400
}
@@ -423,7 +423,47 @@ final class XmlExportCpt
423
wp_all_export_write_article( $article, $element_name, apply_filters('pmxe_sql_field', $val, $element_name, $entry->ID) );
424
}
425
break;
426
427
default:
428
# code...
429
break;
@@ -433,9 +473,13 @@ final class XmlExportCpt
433
{
434
$element_name_in_file = XmlCsvExport::_get_valid_header_name( $element_name );
435
436
$xmlWriter->beginElement($element_name_ns, $element_name_in_file, null);
437
- $xmlWriter->writeData($article[$element_name]);
438
- $xmlWriter->endElement();
439
}
440
}
441
return $article;
394
if ($xmlWriter and XmlExportEngine::$exportOptions['export_to'] == 'xml')
395
{
396
$xmlWriter->beginElement($element_name_ns, 'parent_id', null);
397
+ $xmlWriter->writeData($article['parent_id'], 'parent_id');
398
$xmlWriter->endElement();
399
}
400
}
423
wp_all_export_write_article( $article, $element_name, apply_filters('pmxe_sql_field', $val, $element_name, $entry->ID) );
424
}
425
break;
426
+
427
+ case 'wpml_trid':
428
+
429
+ $post_type = get_post_type($entry->ID);
430
+
431
+ $post_type = apply_filters( 'wpml_element_type', $post_type );
432
+
433
+ $post_language_details = apply_filters('wpml_element_language_details',
434
+ null,
435
+ array(
436
+ 'element_id' => $entry->ID,
437
+ 'element_type' => $post_type
438
+ )
439
+ );
440
+
441
+ $trid = empty($post_language_details->trid) ? '' : $post_language_details->trid;
442
+
443
+ wp_all_export_write_article( $article, $element_name, apply_filters('pmxe_trid_field', $trid, $element_name, $entry->ID) );
444
+
445
+ break;
446
447
+ case 'wpml_lang':
448
+
449
+ $post_type = get_post_type($entry->ID);
450
+
451
+ $post_type = apply_filters( 'wpml_element_type', $post_type );
452
+
453
+ $post_language_details = apply_filters('wpml_element_language_details',
454
+ null,
455
+ array(
456
+ 'element_id' => $entry->ID,
457
+ 'element_type' => $post_type
458
+ )
459
+ );
460
+
461
+ $language_code = empty($post_language_details->language_code) ? '' : $post_language_details->language_code;
462
+
463
+ wp_all_export_write_article( $article, $element_name, apply_filters('pmxe_trid_field', $language_code, $element_name, $entry->ID) );
464
+
465
+ break;
466
+
467
default:
468
# code...
469
break;
473
{
474
$element_name_in_file = XmlCsvExport::_get_valid_header_name( $element_name );
475
476
+ $xmlWriter = apply_filters('wp_all_export_add_before_element', $xmlWriter, $element_name_in_file, XmlExportEngine::$exportID, $entry->ID);
477
+
478
$xmlWriter->beginElement($element_name_ns, $element_name_in_file, null);
479
+ $xmlWriter->writeData($article[$element_name], $element_name_in_file);
480
+ $xmlWriter->endElement();
481
+
482
+ $xmlWriter = apply_filters('wp_all_export_add_after_element', $xmlWriter, $element_name_in_file, XmlExportEngine::$exportID, $entry->ID);
483
}
484
}
485
return $article;
libraries/XmlExportEngine.php CHANGED
@@ -319,6 +319,22 @@ if ( ! class_exists('XmlExportEngine') ){
319
if ( ! self::$is_user_export && ! self::$is_comment_export)
320
{
321
add_filter("wp_all_export_filters", array( &$this, "filter_export_filters"), 10, 1);
322
}
323
324
self::$exportOptions = $post;
@@ -378,11 +394,11 @@ if ( ! class_exists('XmlExportEngine') ){
378
379
if ( self::$is_user_export )
380
{
381
- $this->errors->add('form-validation', __('Upgrade to the professional edition of WP All Export to export users.', 'wp_all_export_plugin'));
382
}
383
elseif ( self::$is_comment_export )
384
{
385
- $this->errors->add('form-validation', __('Upgrade to the professional edition of WP All Export to export comments.', 'wp_all_export_plugin'));
386
}
387
else
388
{
@@ -421,11 +437,11 @@ if ( ! class_exists('XmlExportEngine') ){
421
422
if ( self::$is_user_export )
423
{
424
- $this->errors->add('form-validation', __('Upgrade to the professional edition of WP All Export to export users.', 'pmxe_plugin'));
425
}
426
elseif( self::$is_comment_export )
427
{
428
- $this->errors->add('form-validation', __('Upgrade to the professional edition of WP All Export to export comments.', 'pmxe_plugin'));
429
}
430
else
431
{
@@ -562,21 +578,27 @@ if ( ! class_exists('XmlExportEngine') ){
562
<?php
563
foreach ($this->available_data[$section['content']] as $field)
564
{
565
$is_auto_field = ( ! empty($field['auto']) or self::$is_auto_generate_enabled and 'specific' == $this->post['export_type'] and ! in_array(self::$post_types[0], array('product')));
566
?>
567
<li class="pmxe_<?php echo $slug; ?> <?php if ( $is_auto_field ) echo 'wp_all_export_auto_generate';?>">
568
<div class="custom_column" rel="<?php echo ($i + 1);?>">
569
<label class="wpallexport-xml-element"><?php echo (is_array($field)) ? $field['name'] : $field; ?></label>
570
<input type="hidden" name="ids[]" value="1"/>
571
<input type="hidden" name="cc_label[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
572
- <input type="hidden" name="cc_php[]" value=""/>
573
<input type="hidden" name="cc_code[]" value=""/>
574
- <input type="hidden" name="cc_sql[]" value=""/>
575
- <input type="hidden" name="cc_options[]" value=""/>
576
<input type="hidden" name="cc_type[]" value="<?php echo (is_array($field)) ? $field['type'] : $slug; ?>"/>
577
<input type="hidden" name="cc_value[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
578
<input type="hidden" name="cc_name[]" value="<?php echo (is_array($field)) ? $field['name'] : $field;?>"/>
579
- <input type="hidden" name="cc_settings[]" value=""/>
580
</div>
581
</li>
582
<?php
@@ -601,16 +623,16 @@ if ( ! class_exists('XmlExportEngine') ){
601
</li>
602
<?php
603
foreach ($sub_section['meta'] as $field) {
604
- $field_options = ( in_array($sub_slug, array('images', 'attachments')) ) ? esc_attr('{"is_export_featured":true,"is_export_attached":true,"image_separator":"|"}') : '';
605
?>
606
<li class="pmxe_<?php echo $slug; ?>_<?php echo $sub_slug;?>">
607
<div class="custom_column" rel="<?php echo ($i + 1);?>">
608
<label class="wpallexport-xml-element"><?php echo (is_array($field)) ? $field['name'] : $field; ?></label>
609
<input type="hidden" name="ids[]" value="1"/>
610
<input type="hidden" name="cc_label[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
611
- <input type="hidden" name="cc_php[]" value=""/>
612
- <input type="hidden" name="cc_code[]" value=""/>
613
- <input type="hidden" name="cc_sql[]" value=""/>
614
<input type="hidden" name="cc_options[]" value="<?php echo $field_options; ?>"/>
615
<input type="hidden" name="cc_type[]" value="<?php echo (is_array($field)) ? $field['type'] : $sub_slug; ?>"/>
616
<input type="hidden" name="cc_value[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
@@ -769,7 +791,41 @@ if ( ! class_exists('XmlExportEngine') ){
769
770
<?php
771
772
- endif;
773
}
774
}
775
319
if ( ! self::$is_user_export && ! self::$is_comment_export)
320
{
321
add_filter("wp_all_export_filters", array( &$this, "filter_export_filters"), 10, 1);
322
+
323
+ // When WPML is active and at least one post in the export has a trid
324
+ if (class_exists('SitePress'))
325
+ {
326
+ self::$default_fields[] = array(
327
+ 'label' => 'wpml_trid',
328
+ 'name' => 'WPML Translation ID',
329
+ 'type' => 'wpml_trid'
330
+ );
331
+
332
+ self::$default_fields[] = array(
333
+ 'label' => 'wpml_lang',
334
+ 'name' => 'WPML Language Code',
335
+ 'type' => 'wpml_lang'
336
+ );
337
+ }
338
}
339
340
self::$exportOptions = $post;
394
395
if ( self::$is_user_export )
396
{
397
+ $this->errors->add('form-validation', __('Upgrade to the Pro edition of WP All Export to export users.', 'wp_all_export_plugin'));
398
}
399
elseif ( self::$is_comment_export )
400
{
401
+ $this->errors->add('form-validation', __('Upgrade to the Pro edition of WP All Export to export comments.', 'wp_all_export_plugin'));
402
}
403
else
404
{
437
438
if ( self::$is_user_export )
439
{
440
+ $this->errors->add('form-validation', __('Upgrade to the Pro edition of WP All Export to export users.', 'pmxe_plugin'));
441
}
442
elseif( self::$is_comment_export )
443
{
444
+ $this->errors->add('form-validation', __('Upgrade to the Pro edition of WP All Export to export comments.', 'pmxe_plugin'));
445
}
446
else
447
{
578
<?php
579
foreach ($this->available_data[$section['content']] as $field)
580
{
581
+ $field_type = is_array($field) ? $field['type'] : $slug;
582
+ $field_name = is_array($field) ? $field['name'] : $field;
583
+
584
+ if ( $field_type == 'cf' && $field_name == '_thumbnail_id' ) continue;
585
+
586
$is_auto_field = ( ! empty($field['auto']) or self::$is_auto_generate_enabled and 'specific' == $this->post['export_type'] and ! in_array(self::$post_types[0], array('product')));
587
+
588
?>
589
<li class="pmxe_<?php echo $slug; ?> <?php if ( $is_auto_field ) echo 'wp_all_export_auto_generate';?>">
590
<div class="custom_column" rel="<?php echo ($i + 1);?>">
591
<label class="wpallexport-xml-element"><?php echo (is_array($field)) ? $field['name'] : $field; ?></label>
592
<input type="hidden" name="ids[]" value="1"/>
593
<input type="hidden" name="cc_label[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
594
+ <input type="hidden" name="cc_php[]" value="0"/>
595
<input type="hidden" name="cc_code[]" value=""/>
596
+ <input type="hidden" name="cc_sql[]" value="0"/>
597
+ <input type="hidden" name="cc_options[]" value="0"/>
598
<input type="hidden" name="cc_type[]" value="<?php echo (is_array($field)) ? $field['type'] : $slug; ?>"/>
599
<input type="hidden" name="cc_value[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
600
<input type="hidden" name="cc_name[]" value="<?php echo (is_array($field)) ? $field['name'] : $field;?>"/>
601
+ <input type="hidden" name="cc_settings[]" value="0"/>
602
</div>
603
</li>
604
<?php
623
</li>
624
<?php
625
foreach ($sub_section['meta'] as $field) {
626
+ $field_options = ( in_array($sub_slug, array('images', 'attachments')) ) ? esc_attr('{"is_export_featured":true,"is_export_attached":true,"image_separator":"|"}') : '0';
627
?>
628
<li class="pmxe_<?php echo $slug; ?>_<?php echo $sub_slug;?>">
629
<div class="custom_column" rel="<?php echo ($i + 1);?>">
630
<label class="wpallexport-xml-element"><?php echo (is_array($field)) ? $field['name'] : $field; ?></label>
631
<input type="hidden" name="ids[]" value="1"/>
632
<input type="hidden" name="cc_label[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
633
+ <input type="hidden" name="cc_php[]" value="0"/>
634
+ <input type="hidden" name="cc_code[]" value="0"/>
635
+ <input type="hidden" name="cc_sql[]" value="0"/>
636
<input type="hidden" name="cc_options[]" value="<?php echo $field_options; ?>"/>
637
<input type="hidden" name="cc_type[]" value="<?php echo (is_array($field)) ? $field['type'] : $sub_slug; ?>"/>
638
<input type="hidden" name="cc_value[]" value="<?php echo (is_array($field)) ? $field['label'] : $field; ?>"/>
791
792
<?php
793
794
+ endif;
795
+
796
+ if ( ! empty($section['additional']) )
797
+ {
798
+ foreach ($section['additional'] as $sub_slug => $sub_section)
799
+ {
800
+ if ( $sub_slug == 'attributes' ) {
801
+ ?>
802
+ <optgroup label="<?php echo $sub_section['title']; ?>">
803
+ <?php
804
+ foreach ($sub_section['meta'] as $field) :
805
+
806
+ switch ($field['type']) {
807
+ case 'attr':
808
+ ?>
809
+ <option value="<?php echo 'tx_' . $field['label']; ?>"><?php echo $field['name']; ?></option>
810
+ <?php
811
+ break;
812
+ case 'cf':
813
+ ?>
814
+ <option value="<?php echo 'cf_' . $field['label']; ?>"><?php echo $field['name']; ?></option>
815
+ <?php
816
+ break;
817
+ default:
818
+ # code...
819
+ break;
820
+ }
821
+
822
+ endforeach;
823
+ ?>
824
+ </optgroup>
825
+ <?php
826
+ }
827
+ }
828
+ }
829
}
830
}
831
libraries/XmlExportWooCommerce.php CHANGED
@@ -779,9 +779,13 @@ if ( ! class_exists('XmlExportWooCommerce') )
779
$element_name = (empty($element_name_parts[1])) ? 'untitled_' . $ID : $element_name_parts[1];
780
}
781
782
$xmlWriter->beginElement($element_name_ns, $element_name, null);
783
- $xmlWriter->writeData($data);
784
- $xmlWriter->endElement();
785
}
786
787
}
@@ -880,8 +884,16 @@ if ( ! class_exists('XmlExportWooCommerce') )
880
881
break;
882
case '_downloadable_files':
883
- $templateOptions['single_product_files'] = '{'. $element_name .'_paths[1]}';
884
- $templateOptions['single_product_files_names'] = '{'. $element_name .'_names[1]}';
885
break;
886
case '_download_limit':
887
$templateOptions['single_product_download_limit'] = '{'. $element_name .'[1]}';
779
$element_name = (empty($element_name_parts[1])) ? 'untitled_' . $ID : $element_name_parts[1];
780
}
781
782
+ $xmlWriter = apply_filters('wp_all_export_add_before_element', $xmlWriter, $element_name, XmlExportEngine::$exportID, $record->ID);
783
+
784
$xmlWriter->beginElement($element_name_ns, $element_name, null);
785
+ $xmlWriter->writeData($data, $element_name);
786
+ $xmlWriter->endElement();
787
+
788
+ $xmlWriter = apply_filters('wp_all_export_add_after_element', $xmlWriter, $element_name, XmlExportEngine::$exportID, $record->ID);
789
}
790
791
}
884
885
break;
886
case '_downloadable_files':
887
+ if ($is_xml_template)
888
+ {
889
+ $templateOptions['single_product_files'] = '{'. $element_name .'Paths[1]}';
890
+ $templateOptions['single_product_files_names'] = '{'. $element_name .'Names[1]}';
891
+ }
892
+ else
893
+ {
894
+ $templateOptions['single_product_files'] = '{'. $element_name .'paths[1]}';
895
+ $templateOptions['single_product_files_names'] = '{'. $element_name .'names[1]}';
896
+ }
897
break;
898
case '_download_limit':
899
$templateOptions['single_product_download_limit'] = '{'. $element_name .'[1]}';
libraries/XmlExportWooCommerceOrder.php CHANGED
@@ -553,7 +553,7 @@ if ( ! class_exists('XmlExportWooCommerceOrder') )
553
$element_name = (empty($element_name_parts[1])) ? 'untitled_' . $ID : $element_name_parts[1];
554
}
555
$xmlWriter->beginElement($element_name_ns, $element_name, null);
556
- $xmlWriter->writeData($data);
557
$xmlWriter->endElement();
558
}
559
}
@@ -574,7 +574,7 @@ if ( ! class_exists('XmlExportWooCommerceOrder') )
574
<div class="wpae-custom-field">
575
<?php if ( ! in_array($slug, array('order', 'customer', 'cf', 'other'))) : ?>
576
<div class="wpallexport-free-edition-notice">
577
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=wooco+orders&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export custom order data.','wp_all_export_plugin');?></a>
578
</div>
579
<?php endif; ?>
580
<ul>
553
$element_name = (empty($element_name_parts[1])) ? 'untitled_' . $ID : $element_name_parts[1];
554
}
555
$xmlWriter->beginElement($element_name_ns, $element_name, null);
556
+ $xmlWriter->writeData($data, $element_name);
557
$xmlWriter->endElement();
558
}
559
}
574
<div class="wpae-custom-field">
575
<?php if ( ! in_array($slug, array('order', 'customer', 'cf', 'other'))) : ?>
576
<div class="wpallexport-free-edition-notice">
577
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=wooco+orders&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export custom order data.','wp_all_export_plugin');?></a>
578
</div>
579
<?php endif; ?>
580
<ul>
models/export/record.php CHANGED
@@ -67,14 +67,16 @@ class PMXE_Export_Record extends PMXE_Model_Record {
67
68
file_put_contents($bundle_dir . $template, json_encode($templates));
69
70
- if ($this->options['creata_a_new_export_file'] && ! empty($this->options['cpt']) and class_exists('WooCommerce') and in_array('shop_order', $this->options['cpt']) and empty($this->parent_id) )
71
- {
72
- $bundle_path = $export_dir . $friendly_name . '-' . ($this->iteration + 1) . '.zip';
73
- }
74
- else
75
- {
76
- $bundle_path = $export_dir . $friendly_name . '.zip';
77
- }
78
79
if ( @file_exists($bundle_path))
80
{
67
68
file_put_contents($bundle_dir . $template, json_encode($templates));
69
70
+ // if ($this->options['creata_a_new_export_file'] && ! empty($this->options['cpt']) and class_exists('WooCommerce') and in_array('shop_order', $this->options['cpt']) and empty($this->parent_id) )
71
+ // {
72
+ // $bundle_path = $export_dir . $friendly_name . '-' . ($this->iteration + 1) . '.zip';
73
+ // }
74
+ // else
75
+ // {
76
+ // $bundle_path = $export_dir . $friendly_name . '.zip';
77
+ // }
78
+
79
+ $bundle_path = $export_dir . $friendly_name . '.zip';
80
81
if ( @file_exists($bundle_path))
82
{
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
=== Export WordPress data to XML/CSV ===
2
Contributors: soflyy, wpallimport
3
Requires at least: 4.1
4
- Tested up to: 4.5.1
5
- Stable tag: 1.0.5
6
Tags: wordpress csv export, wordpress xml export, xml, csv, datafeed, export, migrate, export csv from wordpress, export xml from wordpress, advanced xml export, advanced csv export, export data, bulk csv export, export custom post type, export woocommerce products, export woocommerce orders, migrate woocommerce, csv export, export csv, xml export, export xml, csv exporter, datafeed
7
8
WP All Export is an extremely powerful exporter that makes it easy to export any XML or CSV file from WordPress.
@@ -50,7 +50,7 @@ For technical support from the developers, please consider purchasing WP All Exp
50
51
* **Guaranteed technical support via e-mail.**
52
53
- [Upgrade to the professional edition of WP All Export.](http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&utm_medium=wordpress-dot-org-slash-wpae&utm_campaign=free+wp+all+export+plugin)
54
55
= WordPress CSV Exports =
56
@@ -65,7 +65,7 @@ Sometimes you'll want to export your data so that some other tool, software, or
65
If you want to set up a WordPress XML export all you need to do is select 'XML' when configuring your export template. And just like a CSV export, an XML export will allow you to customize the element names and put them in any order you wish.
66
67
== Premium Support ==
68
- Upgrade to the professional edition of WP All Export for premium support.
69
70
E-mail: support@wpallimport.com
71
@@ -78,6 +78,13 @@ Either: -
78
79
== Changelog ==
80
81
= 1.0.5 =
82
* fixed misaligned columns on exporting product attributes
83
* fixed export nested repeaters field in CSV format
1
=== Export WordPress data to XML/CSV ===
2
Contributors: soflyy, wpallimport
3
Requires at least: 4.1
4
+ Tested up to: 4.5.2
5
+ Stable tag: 1.0.6
6
Tags: wordpress csv export, wordpress xml export, xml, csv, datafeed, export, migrate, export csv from wordpress, export xml from wordpress, advanced xml export, advanced csv export, export data, bulk csv export, export custom post type, export woocommerce products, export woocommerce orders, migrate woocommerce, csv export, export csv, xml export, export xml, csv exporter, datafeed
7
8
WP All Export is an extremely powerful exporter that makes it easy to export any XML or CSV file from WordPress.
50
51
* **Guaranteed technical support via e-mail.**
52
53
+ [Upgrade to the Pro edition of WP All Export.](http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&utm_medium=wordpress-dot-org-slash-wpae&utm_campaign=free+wp+all+export+plugin)
54
55
= WordPress CSV Exports =
56
65
If you want to set up a WordPress XML export all you need to do is select 'XML' when configuring your export template. And just like a CSV export, an XML export will allow you to customize the element names and put them in any order you wish.
66
67
== Premium Support ==
68
+ Upgrade to the Pro edition of WP All Export for premium support.
69
70
E-mail: support@wpallimport.com
71
78
79
== Changelog ==
80
81
+ = 1.0.6 =
82
+ * added new filters 'wp_all_export_is_wrap_value_into_cdata', 'wp_all_export_add_before_element', 'wp_all_export_add_after_element'
83
+ * added 'WPML Translation ID' element to available data
84
+ * modified preview to show first 10 records
85
+ * fixed csv export with non comma delimiter
86
+ * fixed conflict with WP Google Maps Pro plugin
87
+
88
= 1.0.5 =
89
* fixed misaligned columns on exporting product attributes
90
* fixed export nested repeaters field in CSV format
static/css/admin.css CHANGED
@@ -1,6 +1,7 @@
1
.wpallexport-plugin .preview_a_row,
2
.wpallexport-plugin .add_column,
3
- .wpallexport-plugin .wp_all_export_auto_generate_data{
4
background: #40acad;
5
-moz-border-radius: 4px;
6
-khtml-border-radius: 4px;
@@ -15,7 +16,8 @@
15
border: none;
16
cursor: pointer;
17
}
18
- .wpallexport-plugin .wp_all_export_auto_generate_data{
19
clear: none;
20
margin-left: 20px;
21
float: left;
@@ -2250,6 +2252,12 @@
2250
padding: 10px;
2251
/*font-style:italic;*/
2252
}
2253
#post-preview .wpallexport-preview-content{
2254
padding: 15px;
2255
overflow: auto;
1
.wpallexport-plugin .preview_a_row,
2
.wpallexport-plugin .add_column,
3
+ .wpallexport-plugin .wp_all_export_auto_generate_data,
4
+ .wpallexport-plugin .wp_all_export_clear_all_data{
5
background: #40acad;
6
-moz-border-radius: 4px;
7
-khtml-border-radius: 4px;
16
border: none;
17
cursor: pointer;
18
}
19
+ .wpallexport-plugin .wp_all_export_auto_generate_data,
20
+ .wpallexport-plugin .wp_all_export_clear_all_data{
21
clear: none;
22
margin-left: 20px;
23
float: left;
2252
padding: 10px;
2253
/*font-style:italic;*/
2254
}
2255
+ #post-preview .wpallexport-preview-title{
2256
+ border-bottom: 1px solid #ccc;
2257
+ margin-bottom: 0;
2258
+ padding-bottom: 10px;
2259
+ text-align: center;
2260
+ }
2261
#post-preview .wpallexport-preview-content{
2262
padding: 15px;
2263
overflow: auto;
static/js/admin.js CHANGED
@@ -241,7 +241,7 @@
241
}
242
243
var request = {
244
- action: 'export_available_rules',
245
data: {'selected' : params.selected},
246
security: wp_all_export_security
247
};
@@ -288,7 +288,7 @@
288
$('.wpallexport-preload-post-data').val(0);
289
290
var request = {
291
- action: 'export_filtering',
292
data: {'cpt' : postType, 'export_type' : 'specific', 'filter_rules_hierarhy' : filter_rules_hierarhy, 'product_matching_mode' : 'strict'},
293
security: wp_all_export_security
294
};
@@ -356,7 +356,7 @@
356
357
// prepare data for ajax request to get post count after filtering
358
var request = {
359
- action: 'export_filtering_count',
360
data: {
361
'cpt' : postType,
362
'filter_rules_hierarhy' : $('input[name=filter_rules_hierarhy]').val(),
@@ -1147,7 +1147,7 @@
1147
$pointer.css({'position':'fixed', 'top' : '15%', 'left' : $leftOffset + 'px'});
1148
1149
var request = {
1150
- action: 'export_preview',
1151
data: $('form.wpallexport-step-3').serialize(),
1152
tagno: tagno,
1153
security: wp_all_export_security
@@ -1322,6 +1322,11 @@
1322
1323
});
1324
1325
if ($('input[name^=selected_post_type]').length){
1326
1327
var postType = $('input[name^=selected_post_type]').val();
241
}
242
243
var request = {
244
+ action: 'wpae_available_rules',
245
data: {'selected' : params.selected},
246
security: wp_all_export_security
247
};
288
$('.wpallexport-preload-post-data').val(0);
289
290
var request = {
291
+ action: 'wpae_filtering',
292
data: {'cpt' : postType, 'export_type' : 'specific', 'filter_rules_hierarhy' : filter_rules_hierarhy, 'product_matching_mode' : 'strict'},
293
security: wp_all_export_security
294
};
356
357
// prepare data for ajax request to get post count after filtering
358
var request = {
359
+ action: 'wpae_filtering_count',
360
data: {
361
'cpt' : postType,
362
'filter_rules_hierarhy' : $('input[name=filter_rules_hierarhy]').val(),
1147
$pointer.css({'position':'fixed', 'top' : '15%', 'left' : $leftOffset + 'px'});
1148
1149
var request = {
1150
+ action: 'wpae_preview',
1151
data: $('form.wpallexport-step-3').serialize(),
1152
tagno: tagno,
1153
security: wp_all_export_security
1322
1323
});
1324
1325
+ $('.wp_all_export_clear_all_data').live('click', function(){
1326
+ $('ol#columns').find('li:not(.placeholder)').remove();
1327
+ $('ol#columns').find('li.placeholder').fadeIn();
1328
+ });
1329
+
1330
if ($('input[name^=selected_post_type]').length){
1331
1332
var postType = $('input[name^=selected_post_type]').val();
views/admin/export/blocks/filters.php CHANGED
@@ -1,5 +1,5 @@
1
<div class="wpallexport-free-edition-notice" style="padding: 20px; margin-bottom: 10px;">
2
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-pro/?utm_source=free-plugin&amp;utm_medium=in-plugin&amp;utm_campaign=download-from-url"><?php _e('Upgrade to the professional edition of WP All Export to add filtering rules.','wp_all_export_plugin');?></a>
3
</div>
4
<div class="wp_all_export_rule_inputs">
5
<table>
1
<div class="wpallexport-free-edition-notice" style="padding: 20px; margin-bottom: 10px;">
2
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-pro/?utm_source=free-plugin&amp;utm_medium=in-plugin&amp;utm_campaign=download-from-url"><?php _e('Upgrade to the Pro edition of WP All Export to add filtering rules.','wp_all_export_plugin');?></a>
3
</div>
4
<div class="wp_all_export_rule_inputs">
5
<table>
views/admin/export/index.php CHANGED
@@ -54,37 +54,52 @@
54
55
<select id="file_selector">
56
<option value=""><?php _e('Choose a post type...', 'wp_all_export_plugin'); ?></option>
57
- <?php if (count($custom_types)): ?>
58
<?php foreach ($custom_types as $key => $ct):?>
59
<?php
60
$image_src = 'dashicon-cpt';
61
$cpt_label = $ct->labels->name;
62
63
if ( in_array($key, array('post', 'page', 'product', 'import_users', 'shop_order', 'shop_coupon', 'shop_customer') ) )
64
$image_src = 'dashicon-' . $key;
65
-
66
?>
67
<option value="<?php echo $key;?>" data-imagesrc="dashicon <?php echo $image_src; ?>" <?php if ($key == $post['cpt']) echo 'selected="selected"'; ?>><?php echo $cpt_label; ?></option>
68
<?php endforeach ?>
69
<?php endif ?>
70
<option value="users" data-imagesrc="dashicon dashicon-import_users" <?php if ('users' == $post['cpt']) echo 'selected="selected"'; ?>><?php _e("Users", "wp_all_export_plugin"); ?></option>
71
<option value="comments" data-imagesrc="dashicon dashicon-comments" <?php if ('comments' == $post['cpt']) echo 'selected="selected"'; ?>><?php _e("Comments", "wp_all_export_plugin"); ?></option>
72
</select>
73
<input type="hidden" name="cpt" value="<?php echo $post['cpt']; ?>"/>
74
75
</div>
76
77
<div class="wpallexport-free-edition-notice wpallexport-user-export-notice">
78
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export users.','wp_all_export_plugin');?></a>
79
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
80
</div>
81
<div class="wpallexport-free-edition-notice wpallexport-shop_customer-export-notice">
82
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export customers.','wp_all_export_plugin');?></a>
83
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
84
</div>
85
<div class="wpallexport-free-edition-notice wpallexport-comments-export-notice">
86
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export comments.','wp_all_export_plugin');?></a>
87
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
88
</div>
89
</div>
90
@@ -98,13 +113,13 @@
98
</select>
99
100
<div class="wpallexport-free-edition-notice wpallexport-user-export-notice" style="margin-bottom: 20px;">
101
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export users.','wp_all_export_plugin');?></a>
102
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
103
</div>
104
105
<div class="wpallexport-free-edition-notice wpallexport-comments-export-notice" style="margin-bottom: 20px;">
106
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export comments.','wp_all_export_plugin');?></a>
107
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
108
</div>
109
110
<input type="hidden" name="wp_query_selector" value="<?php echo $post['wp_query_selector'];?>">
54
55
<select id="file_selector">
56
<option value=""><?php _e('Choose a post type...', 'wp_all_export_plugin'); ?></option>
57
+ <?php if (count($custom_types)): $unknown_cpt = array();?>
58
<?php foreach ($custom_types as $key => $ct):?>
59
<?php
60
$image_src = 'dashicon-cpt';
61
$cpt_label = $ct->labels->name;
62
63
if ( in_array($key, array('post', 'page', 'product', 'import_users', 'shop_order', 'shop_coupon', 'shop_customer') ) )
64
+ {
65
$image_src = 'dashicon-' . $key;
66
+ }
67
+ else
68
+ {
69
+ $unknown_cpt[$key] = $ct;
70
+ continue;
71
+ }
72
?>
73
<option value="<?php echo $key;?>" data-imagesrc="dashicon <?php echo $image_src; ?>" <?php if ($key == $post['cpt']) echo 'selected="selected"'; ?>><?php echo $cpt_label; ?></option>
74
<?php endforeach ?>
75
<?php endif ?>
76
<option value="users" data-imagesrc="dashicon dashicon-import_users" <?php if ('users' == $post['cpt']) echo 'selected="selected"'; ?>><?php _e("Users", "wp_all_export_plugin"); ?></option>
77
<option value="comments" data-imagesrc="dashicon dashicon-comments" <?php if ('comments' == $post['cpt']) echo 'selected="selected"'; ?>><?php _e("Comments", "wp_all_export_plugin"); ?></option>
78
+ <?php if ( ! empty($unknown_cpt)): ?>
79
+ <?php foreach ($unknown_cpt as $key => $ct):?>
80
+ <?php
81
+ $image_src = 'dashicon-cpt';
82
+ $cpt_label = $ct->labels->name;
83
+ ?>
84
+ <option value="<?php echo $key;?>" data-imagesrc="dashicon <?php echo $image_src; ?>" <?php if ($key == $post['cpt']) echo 'selected="selected"'; ?>><?php echo $cpt_label; ?></option>
85
+ <?php endforeach ?>
86
+ <?php endif;?>
87
</select>
88
<input type="hidden" name="cpt" value="<?php echo $post['cpt']; ?>"/>
89
90
</div>
91
92
<div class="wpallexport-free-edition-notice wpallexport-user-export-notice">
93
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export users.','wp_all_export_plugin');?></a>
94
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
95
</div>
96
<div class="wpallexport-free-edition-notice wpallexport-shop_customer-export-notice">
97
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export customers.','wp_all_export_plugin');?></a>
98
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
99
</div>
100
<div class="wpallexport-free-edition-notice wpallexport-comments-export-notice">
101
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export comments.','wp_all_export_plugin');?></a>
102
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
103
</div>
104
</div>
105
113
</select>
114
115
<div class="wpallexport-free-edition-notice wpallexport-user-export-notice" style="margin-bottom: 20px;">
116
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export users.','wp_all_export_plugin');?></a>
117
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
118
</div>
119
120
<div class="wpallexport-free-edition-notice wpallexport-comments-export-notice" style="margin-bottom: 20px;">
121
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=export-users&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export comments.','wp_all_export_plugin');?></a>
122
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
123
</div>
124
125
<input type="hidden" name="wp_query_selector" value="<?php echo $post['wp_query_selector'];?>">
views/admin/export/options/settings.php CHANGED
@@ -16,7 +16,7 @@
16
<input type="hidden" name="export_only_new_stuff" value="0" />
17
<input type="checkbox" id="export_only_new_stuff" name="export_only_new_stuff" value="1" <?php echo $post['export_only_new_stuff'] ? 'checked="checked"': '' ?> disabled="disabled"/>
18
<label for="export_only_new_stuff" disabled="disabled"><?php printf(__('Only export %s once', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : wp_all_export_get_cpt_name($post['cpt'])); ?></label>
19
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('If re-run, this export will only include records that have not been previously exported.<br><br><strong>Upgrade to the professional edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
20
</div>
21
<div class="input" style="margin:5px 0px;">
22
<input type="hidden" name="include_bom" value="0" />
@@ -27,15 +27,9 @@
27
<div class="input" style="margin:5px 0px;">
28
<input type="hidden" name="creata_a_new_export_file" value="0" />
29
<input type="checkbox" id="creata_a_new_export_file" name="creata_a_new_export_file" value="1" <?php echo $post['creata_a_new_export_file'] ? 'checked="checked"': '' ?> />
30
- <?php if ( ! XmlExportEngine::$is_auto_generate_enabled || ! XmlExportWooCommerceOrder::$is_active || $post['export_type'] != 'specific'): ?>
31
<label for="creata_a_new_export_file"><?php _e('Create a new file each time export is run', 'wp_all_export_plugin') ?></label>
32
- <?php else: ?>
33
- <label for="creata_a_new_export_file"><?php _e('Create a new import bundle each time export is run', 'wp_all_export_plugin') ?></label>
34
- <?php endif; ?>
35
<a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('If disabled, the export file will be overwritten every time this export run.', 'wp_all_export_plugin'); ?>">?</a>
36
</div>
37
-
38
- <?php if ( ! XmlExportEngine::$is_auto_generate_enabled || ! XmlExportWooCommerceOrder::$is_active || $post['export_type'] != 'specific'): ?>
39
<div class="input" style="margin:5px 0px;">
40
<input type="hidden" name="split_large_exports" value="0" />
41
<input type="checkbox" id="split_large_exports" name="split_large_exports" class="switcher" value="1" <?php echo $post['split_large_exports'] ? 'checked="checked"': '' ?> />
@@ -45,56 +39,7 @@
45
<label for="records_per_request"><?php _e('Limit export to', 'wp_all_export_plugin');?></label> <input type="text" name="split_large_exports_count" class="wp_all_export_sub_input" style="width: 50px;" value="<?php echo esc_attr($post['split_large_exports_count']) ?>" /> <?php _e('records per file', 'wp_all_export_plugin'); ?>
46
</div>
47
</span>
48
- </div>
49
- <?php endif; ?>
50
-
51
- <?php if ( XmlExportEngine::$is_auto_generate_enabled && XmlExportWooCommerceOrder::$is_active && $post['export_type'] == 'specific'): ?>
52
- <!-- Include products -->
53
- <div class="input" style="margin:5px 0px;">
54
- <input type="hidden" name="order_include_poducts" value="0" />
55
- <input type="checkbox" id="order_include_poducts" name="order_include_poducts" class="switcher" value="1" <?php echo $post['order_include_poducts'] ? 'checked="checked"': '' ?> />
56
- <label for="order_include_poducts"><?php _e('Include products', 'wp_all_export_plugin') ?></label>
57
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('Products purchased in these orders will also be exported.', 'wp_all_export_plugin'); ?>">?</a>
58
- <span class="switcher-target-order_include_poducts pl17" style="display:block; clear: both; width: 100%;">
59
- <div class="input" style="margin-left: 5px;">
60
- <input type="hidden" name="order_include_all_poducts" value="0" />
61
- <input type="checkbox" id="order_include_all_poducts" name="order_include_all_poducts" class="switcher" value="1" <?php echo $post['order_include_all_poducts'] ? 'checked="checked"': '' ?> />
62
- <label for="order_include_all_poducts"><?php _e('Export all products', 'wp_all_export_plugin') ?></label>
63
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('All products will be exported, not only those that were purchased in these orders.', 'wp_all_export_plugin'); ?>">?</a>
64
- </div>
65
- </span>
66
- </div>
67
- <!-- Include Coupons -->
68
- <div class="input" style="margin:5px 0px;">
69
- <input type="hidden" name="order_include_coupons" value="0" />
70
- <input type="checkbox" id="order_include_coupons" name="order_include_coupons" class="switcher" value="1" <?php echo $post['order_include_coupons'] ? 'checked="checked"': '' ?> />
71
- <label for="order_include_coupons"><?php _e('Include coupons', 'wp_all_export_plugin') ?></label>
72
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('Coupons used in these orders will also be exported.', 'wp_all_export_plugin'); ?>">?</a>
73
- <span class="switcher-target-order_include_coupons pl17" style="display:block; clear: both; width: 100%;">
74
- <div class="input" style="margin-left: 5px;">
75
- <input type="hidden" name="order_include_all_coupons" value="0" />
76
- <input type="checkbox" id="order_include_all_coupons" name="order_include_all_coupons" class="switcher" value="1" <?php echo $post['order_include_all_coupons'] ? 'checked="checked"': '' ?> />
77
- <label for="order_include_all_coupons"><?php _e('Export all coupons', 'wp_all_export_plugin') ?></label>
78
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('All coupons will be exported, not only those that were used in these orders.', 'wp_all_export_plugin'); ?>">?</a>
79
- </div>
80
- </span>
81
- </div>
82
- <!-- Include Customers -->
83
- <div class="input" style="margin:5px 0px;">
84
- <input type="hidden" name="order_include_customers" value="0" />
85
- <input type="checkbox" id="order_include_customers" name="order_include_customers" class="switcher" value="1" <?php echo $post['order_include_customers'] ? 'checked="checked"': '' ?> />
86
- <label for="order_include_customers"><?php _e('Include customers', 'wp_all_export_plugin') ?></label>
87
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('Customers who purchased created orders will also be exported.', 'wp_all_export_plugin'); ?>">?</a>
88
- <span class="switcher-target-order_include_customers pl17" style="display:block; clear: both; width: 100%;">
89
- <div class="input" style="margin-left: 5px;">
90
- <input type="hidden" name="order_include_all_customers" value="0" />
91
- <input type="checkbox" id="order_include_all_customers" name="order_include_all_customers" class="switcher" value="1" <?php echo $post['order_include_all_customers'] ? 'checked="checked"': '' ?> />
92
- <label for="order_include_all_customers"><?php _e('Export all customers', 'wp_all_export_plugin') ?></label>
93
- <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('All customers will be exported, not only those that created these orders.', 'wp_all_export_plugin'); ?>">?</a>
94
- </div>
95
- </span>
96
- </div>
97
- <?php endif; ?>
98
<br>
99
<hr>
100
<p style="text-align:right;">
16
<input type="hidden" name="export_only_new_stuff" value="0" />
17
<input type="checkbox" id="export_only_new_stuff" name="export_only_new_stuff" value="1" <?php echo $post['export_only_new_stuff'] ? 'checked="checked"': '' ?> disabled="disabled"/>
18
<label for="export_only_new_stuff" disabled="disabled"><?php printf(__('Only export %s once', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : wp_all_export_get_cpt_name($post['cpt'])); ?></label>
19
+ <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('If re-run, this export will only include records that have not been previously exported.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
20
</div>
21
<div class="input" style="margin:5px 0px;">
22
<input type="hidden" name="include_bom" value="0" />
27
<div class="input" style="margin:5px 0px;">
28
<input type="hidden" name="creata_a_new_export_file" value="0" />
29
<input type="checkbox" id="creata_a_new_export_file" name="creata_a_new_export_file" value="1" <?php echo $post['creata_a_new_export_file'] ? 'checked="checked"': '' ?> />
30
<label for="creata_a_new_export_file"><?php _e('Create a new file each time export is run', 'wp_all_export_plugin') ?></label>
31
<a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php _e('If disabled, the export file will be overwritten every time this export run.', 'wp_all_export_plugin'); ?>">?</a>
32
</div>
33
<div class="input" style="margin:5px 0px;">
34
<input type="hidden" name="split_large_exports" value="0" />
35
<input type="checkbox" id="split_large_exports" name="split_large_exports" class="switcher" value="1" <?php echo $post['split_large_exports'] ? 'checked="checked"': '' ?> />
39
<label for="records_per_request"><?php _e('Limit export to', 'wp_all_export_plugin');?></label> <input type="text" name="split_large_exports_count" class="wp_all_export_sub_input" style="width: 50px;" value="<?php echo esc_attr($post['split_large_exports_count']) ?>" /> <?php _e('records per file', 'wp_all_export_plugin'); ?>
40
</div>
41
</span>
42
+ </div>
43
<br>
44
<hr>
45
<p style="text-align:right;">
views/admin/export/template.php CHANGED
@@ -173,7 +173,8 @@
173
<!-- Add New Field Button -->
174
<div class="input" style="float:left; margin: 0 20px 15px;">
175
<input type="button" value="<?php _e('Add Field', 'wp_all_export_plugin');?>" class="add_column" style="float:left;">
176
- <input type="button" value="<?php _e('Add All Fields', 'wp_all_export_plugin'); ?>" class="wp_all_export_auto_generate_data">
177
</div>
178
179
<!-- Preview a Row Button -->
@@ -227,9 +228,9 @@
227
<input type="text" name="delimiter" value="<?php echo esc_attr($post['delimiter']) ?>" style="width: 40px; height: 30px; top: 0px; text-align: center;"/>
228
</div>
229
<div class="wpallexport-clear"></div>
230
- <div class="input switcher-target-export_to_xls" style="vertical-align:middle; height: 35px; position: relative; top: -13px;">
231
<span class="wpallexport-free-edition-notice">
232
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=wooco+orders&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to export to Excel. <br>If you already own it, remove the free edition and install the professional edition.','wp_all_export_plugin');?></a>
233
</span>
234
</div>
235
</div>
173
<!-- Add New Field Button -->
174
<div class="input" style="float:left; margin: 0 20px 15px;">
175
<input type="button" value="<?php _e('Add Field', 'wp_all_export_plugin');?>" class="add_column" style="float:left;">
176
+ <input type="button" value="<?php _e('Add All', 'wp_all_export_plugin'); ?>" class="wp_all_export_auto_generate_data">
177
+ <input type="button" value="<?php _e('Clear All', 'wp_all_export_plugin'); ?>" class="wp_all_export_clear_all_data">
178
</div>
179
180
<!-- Preview a Row Button -->
228
<input type="text" name="delimiter" value="<?php echo esc_attr($post['delimiter']) ?>" style="width: 40px; height: 30px; top: 0px; text-align: center;"/>
229
</div>
230
<div class="wpallexport-clear"></div>
231
+ <div class="input switcher-target-export_to_xls" style="vertical-align:middle; position: relative; top: -13px;">
232
<span class="wpallexport-free-edition-notice">
233
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=wooco+orders&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to export to Excel. <br>If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></a>
234
</span>
235
</div>
236
</div>
views/admin/export/template/advanced_field_options.php CHANGED
@@ -60,7 +60,7 @@
60
<a href="#help" class="wpallexport-help" title="<?php _e('The value of the field chosen for export will be passed to the PHP function.', 'wp_all_export_plugin'); ?>" style="top: 0;">?</a>
61
<div class="switcher-target-coperate_php" style="margin-top:5px;">
62
<div class="wpallexport-free-edition-notice" style="margin: 15px 0;">
63
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=custom-php&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to enable custom PHP functions.','wp_all_export_plugin');?></a>
64
</div>
65
<?php echo "&lt;?php ";?>
66
<input type="text" class="php_code" value="" style="width:50%;" placeholder='your_function_name'/>
60
<a href="#help" class="wpallexport-help" title="<?php _e('The value of the field chosen for export will be passed to the PHP function.', 'wp_all_export_plugin'); ?>" style="top: 0;">?</a>
61
<div class="switcher-target-coperate_php" style="margin-top:5px;">
62
<div class="wpallexport-free-edition-notice" style="margin: 15px 0;">
63
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=custom-php&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to enable custom PHP functions.','wp_all_export_plugin');?></a>
64
</div>
65
<?php echo "&lt;?php ";?>
66
<input type="text" class="php_code" value="" style="width:50%;" placeholder='your_function_name'/>
views/admin/help/index.php CHANGED
@@ -15,7 +15,7 @@
15
16
<p style="font-size: 1.3em !important;"><?php _e('While we do our best to provide technical support to users of the free version, we must prioritize requests from pro users.</br>If you need any help with WP All Export e-mail us at the address above or submit a ticket through the support form.', 'wp_all_export_plugin');?></p>
17
18
- <p style="font-size: 1.3em !important;"><a href="http://www.wpallimport.com/export/?utm_source=wordpress.org&utm_medium=support-page&utm_campaign=free+wp+all+export+plugin" target="_blank"><?php _e('For premium support, please upgrade to the professional edition of WP All Export.', 'wp_all_export_plugin');?></a></p>
19
20
</td>
21
<td class="right">&nbsp;</td>
15
16
<p style="font-size: 1.3em !important;"><?php _e('While we do our best to provide technical support to users of the free version, we must prioritize requests from pro users.</br>If you need any help with WP All Export e-mail us at the address above or submit a ticket through the support form.', 'wp_all_export_plugin');?></p>
17
18
+ <p style="font-size: 1.3em !important;"><a href="http://www.wpallimport.com/export/?utm_source=wordpress.org&utm_medium=support-page&utm_campaign=free+wp+all+export+plugin" target="_blank"><?php _e('For premium support, please upgrade to the Pro edition of WP All Export.', 'wp_all_export_plugin');?></a></p>
19
20
</td>
21
<td class="right">&nbsp;</td>
views/admin/manage/scheduling.php CHANGED
@@ -3,8 +3,8 @@
3
</h2>
4
5
<div class="wpallexport-free-edition-notice" style="padding: 20px; margin-left: 0px;">
6
- <a class="upgrade_link" target="_blank" href="http://www.wpallexport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=cron&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to enable automated exports.', 'wp_all_export_plugin');?></a>
7
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
8
</div>
9
10
<p>
3
</h2>
4
5
<div class="wpallexport-free-edition-notice" style="padding: 20px; margin-left: 0px;">
6
+ <a class="upgrade_link" target="_blank" href="http://www.wpallexport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=cron&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to enable automated exports.', 'wp_all_export_plugin');?></a>
7
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
8
</div>
9
10
<p>
views/admin/settings/index.php CHANGED
@@ -107,8 +107,8 @@
107
</table>
108
109
<div class="wpallexport-free-edition-notice" style="margin: 15px 0; padding: 20px;">
110
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=custom-php&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to add Zapier integration.','wp_all_export_plugin');?></a>
111
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
112
</div>
113
114
<div class="clear"></div>
@@ -130,8 +130,8 @@
130
<h3><?php _e('Function Editor', 'pmxe_plugin') ?></h3>
131
132
<div class="wpallexport-free-edition-notice" style="margin: 15px 0; padding: 20px;">
133
- <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=custom-php&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the professional edition of WP All Export to enable the Function Editor.','wp_all_export_plugin');?></a>
134
- <p><?php _e('If you already own it, remove the free edition and install the professional edition.', 'wp_all_export_plugin'); ?></p>
135
</div>
136
137
<textarea id="wp_all_export_code" name="wp_all_export_code"><?php echo "<?php\n\n?>";?></textarea>
107
</table>
108
109
<div class="wpallexport-free-edition-notice" style="margin: 15px 0; padding: 20px;">
110
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=custom-php&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to add Zapier integration.','wp_all_export_plugin');?></a>
111
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
112
</div>
113
114
<div class="clear"></div>
130
<h3><?php _e('Function Editor', 'pmxe_plugin') ?></h3>
131
132
<div class="wpallexport-free-edition-notice" style="margin: 15px 0; padding: 20px;">
133
+ <a class="upgrade_link" target="_blank" href="http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=wordpress.org&amp;utm_medium=custom-php&amp;utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to enable the Function Editor.','wp_all_export_plugin');?></a>
134
+ <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
135
</div>
136
137
<textarea id="wp_all_export_code" name="wp_all_export_code"><?php echo "<?php\n\n?>";?></textarea>
wp-all-export.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: WP All Export
4
Plugin URI: http://www.wpallimport.com/export/
5
Description: Export any post type to a CSV or XML file. Edit the exported data, and then re-import it later using WP All Import.
6
- Version: 1.0.5
7
Author: Soflyy
8
*/
9
@@ -50,7 +50,7 @@ else {
50
*/
51
define('PMXE_PREFIX', 'pmxe_');
52
53
- define('PMXE_VERSION', '1.0.5');
54
55
define('PMXE_EDITION', 'free');
56
@@ -481,10 +481,11 @@ else {
481
* @return mixed
482
*/
483
public function getOption($option = NULL) {
484
if (is_null($option)) {
485
- return $this->options;
486
- } else if (isset($this->options[$option])) {
487
- return $this->options[$option];
488
} else {
489
throw new Exception("Specified option is not defined for the plugin");
490
}
3
Plugin Name: WP All Export
4
Plugin URI: http://www.wpallimport.com/export/
5
Description: Export any post type to a CSV or XML file. Edit the exported data, and then re-import it later using WP All Import.
6
+ Version: 1.0.6
7
Author: Soflyy
8
*/
9
50
*/
51
define('PMXE_PREFIX', 'pmxe_');
52
53
+ define('PMXE_VERSION', '1.0.6');
54
55
define('PMXE_EDITION', 'free');
56
481
* @return mixed
482
*/
483
public function getOption($option = NULL) {
484
+ $options = apply_filters('wp_all_export_config_options', $this->options);
485
if (is_null($option)) {
486
+ return $options;
487
+ } else if (isset($options[$option])) {
488
+ return $options[$option];
489
} else {
490
throw new Exception("Specified option is not defined for the plugin");
491
}