Export WordPress data to XML/CSV - Version 1.0.7

Version Description

  • fixed db schema for multisite
  • fixed export order items date
  • fixed media items export ordering
  • fixed import template for media items
  • fixed export ACF repeater in XML format
  • added new filter 'wp_all_export_csv_headers'
  • added possibility to use tab as csv delimiter "\t"
  • updated french translation
Download this release

Release Info

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

Code changes from version 1.0.6 to 1.0.7

actions/wp_ajax_wpae_filtering_count.php CHANGED
@@ -75,6 +75,7 @@ function pmxe_wp_ajax_wpae_filtering_count(){
75
{
76
remove_all_actions('parse_query');
77
remove_all_actions('pre_get_posts');
78
79
ob_start();
80
// get custom post type records depends on filters
@@ -123,6 +124,7 @@ function pmxe_wp_ajax_wpae_filtering_count(){
123
{
124
remove_all_actions('parse_query');
125
remove_all_actions('pre_get_posts');
126
127
$cpt = ($is_products_export) ? array('product', 'product_variation') : array($post['cpt']);
128
75
{
76
remove_all_actions('parse_query');
77
remove_all_actions('pre_get_posts');
78
+ remove_all_filters('posts_clauses');
79
80
ob_start();
81
// get custom post type records depends on filters
124
{
125
remove_all_actions('parse_query');
126
remove_all_actions('pre_get_posts');
127
+ remove_all_filters('posts_clauses');
128
129
$cpt = ($is_products_export) ? array('product', 'product_variation') : array($post['cpt']);
130
actions/wp_ajax_wpae_preview.php CHANGED
@@ -71,6 +71,7 @@ function pmxe_wp_ajax_wpae_preview(){
71
{
72
remove_all_actions('parse_query');
73
remove_all_actions('pre_get_posts');
74
75
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
76
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
71
{
72
remove_all_actions('parse_query');
73
remove_all_actions('pre_get_posts');
74
+ remove_all_filters('posts_clauses');
75
76
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
77
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
actions/wp_ajax_wpallexport.php CHANGED
@@ -58,6 +58,7 @@ function pmxe_wp_ajax_wpallexport(){
58
{
59
remove_all_actions('parse_query');
60
remove_all_actions('pre_get_posts');
61
62
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
63
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
@@ -83,7 +84,8 @@ function pmxe_wp_ajax_wpallexport(){
83
else
84
{
85
remove_all_actions('parse_query');
86
- remove_all_actions('pre_get_posts');
87
88
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
89
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
58
{
59
remove_all_actions('parse_query');
60
remove_all_actions('pre_get_posts');
61
+ remove_all_filters('posts_clauses');
62
63
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
64
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
84
else
85
{
86
remove_all_actions('parse_query');
87
+ remove_all_actions('pre_get_posts');
88
+ remove_all_filters('posts_clauses');
89
90
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
91
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
actions/wpmu_new_blog.php ADDED
@@ -0,0 +1,21 @@
1
+ <?php
2
+
3
+ function pmxe_wpmu_new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta)
4
+ {
5
+ // create/update required database tables
6
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
7
+ require PMXE_Plugin::ROOT_DIR . '/schema.php';
8
+ global $wpdb;
9
+
10
+ if (function_exists('is_multisite') && is_multisite()) {
11
+ // check if it is a network activation - if so, run the activation function for each blog id
12
+ $old_blog = $wpdb->blogid;
13
+
14
+ switch_to_blog($blog_id);
15
+ require PMXE_Plugin::ROOT_DIR . '/schema.php';
16
+ dbDelta($plugin_queries);
17
+
18
+ switch_to_blog($old_blog);
19
+ return;
20
+ }
21
+ }
controllers/admin/export.php CHANGED
@@ -197,7 +197,7 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
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();
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 contact your web host to increase it.', 'wp_all_export_plugin'), $max_input_vars));
201
}
202
203
PMXE_Plugin::$session->save_data();
helpers/wp_all_export_generate_export_file.php CHANGED
@@ -17,7 +17,7 @@ if ( ! function_exists('wp_all_export_generate_export_file') )
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
}
22
else
23
{
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
}
22
else
23
{
i18n/languages/wp_all_export_plugin-fr_FR.mo CHANGED
Binary file
i18n/languages/wp_all_export_plugin-fr_FR.po CHANGED
@@ -2,12 +2,12 @@ msgid ""
2
msgstr ""
3
"Project-Id-Version: WP All Export\n"
4
"POT-Creation-Date: 2015-10-05 22:42-0600\n"
5
- "PO-Revision-Date: 2016-01-27 12:30+0200\n"
6
"Language-Team: \n"
7
"MIME-Version: 1.0\n"
8
"Content-Type: text/plain; charset=UTF-8\n"
9
"Content-Transfer-Encoding: 8bit\n"
10
- "X-Generator: Poedit 1.8.4\n"
11
"X-Poedit-Basepath: .\n"
12
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
13
"X-Poedit-SourceCharset: UTF-8\n"
@@ -29,7 +29,7 @@ msgstr "année"
29
#: views/admin/export/process.php:9 views/admin/export/template.php:7
30
#: views/admin/manage/index.php:4 views/admin/settings/index.php:6
31
msgid "WP All Export"
32
- msgstr "WP Tous Export"
33
34
#: actions/admin_menu.php:11
35
msgid "All Export"
@@ -41,7 +41,7 @@ msgstr "Exporter vers XML"
41
42
#: actions/admin_menu.php:14
43
msgid "New Export"
44
- msgstr "Nouvelle Export"
45
46
#: actions/admin_menu.php:15 views/admin/export/process.php:51
47
#: views/admin/manage/index.php:5
@@ -228,7 +228,7 @@ msgstr "Exporter #%s est pas déclenché. Demande ignorée."
228
#: actions/wp_loaded.php:77
229
#, php-format
230
msgid "Export #%s complete"
231
- msgstr "Exporter le #%s de complète de"
232
233
#: actions/wp_loaded.php:82
234
#, php-format
@@ -291,11 +291,11 @@ msgstr "&raquo;"
291
292
#: controllers/admin/manage.php:155 views/admin/manage/index.php:292
293
msgid "Export canceled"
294
- msgstr "Exporter annulé"
295
296
#: controllers/admin/manage.php:221
297
msgid "Export deleted"
298
- msgstr "Export supprimé"
299
300
#: controllers/admin/manage.php:249
301
#, php-format
@@ -481,7 +481,7 @@ msgstr "Titre"
481
#: libraries/XmlExportWooCommerceOrder.php:72
482
#: libraries/XmlExportWooCommerceOrder.php:954
483
msgid "Order Status"
484
- msgstr "Užsakymo būsena"
485
486
#: libraries/XmlExportWooCommerceOrder.php:73
487
#: libraries/XmlExportWooCommerceOrder.php:955
@@ -491,7 +491,7 @@ msgstr "Afin devise"
491
#: libraries/XmlExportWooCommerceOrder.php:74
492
#: libraries/XmlExportWooCommerceOrder.php:956
493
msgid "Payment Method"
494
- msgstr "Mokėjimo būdas"
495
496
#: libraries/XmlExportWooCommerceOrder.php:75
497
#: libraries/XmlExportWooCommerceOrder.php:957
@@ -620,7 +620,7 @@ msgstr "Tout d'abord, choisir ce que d'exporter."
620
621
#: views/admin/export/index.php:33
622
msgid "Specific Post Type"
623
- msgstr "Type Contribution spécifique"
624
625
#: views/admin/export/index.php:37
626
msgid "WP_Query Results"
@@ -659,16 +659,16 @@ msgstr "Créé par"
659
660
#: views/admin/export/options.php:43
661
msgid "Your export is ready to run."
662
- msgstr "Votre exportation est prêt à fonctionner."
663
664
#: views/admin/export/options.php:45
665
#, php-format
666
msgid "WP All Export will export %d %s."
667
- msgstr "WP toute exportation exportera %d %s."
668
669
#: views/admin/export/options.php:54 views/admin/export/options.php:227
670
msgid "Confirm & Run Export"
671
- msgstr "Confirmation d'exportation"
672
673
#: views/admin/export/options.php:70
674
msgid "Filters"
@@ -676,7 +676,7 @@ msgstr "Filtres"
676
677
#: views/admin/export/options.php:185
678
msgid "Advanced Export"
679
- msgstr "Export"
680
681
#: views/admin/export/options.php:195
682
msgid "Include BOM in export file"
@@ -704,10 +704,10 @@ msgid ""
704
"server's timeout settings. If your export fails before completion, to "
705
"troubleshoot you should lower this number."
706
msgstr ""
707
- "WP toute exportation doit être en mesure de traiter ces nombreux "
708
- "enregistrements en moins les paramètres de délai d'attente de votre serveur. "
709
- "Si votre exportation échoue avant la fin, pour résoudre les problèmes que "
710
- "vous devriez réduire ce nombre."
711
712
#: views/admin/export/options.php:206
713
msgid "Friendly Name:"
@@ -744,19 +744,19 @@ msgstr ""
744
745
#: views/admin/export/process.php:29
746
msgid "Time Elapsed"
747
- msgstr "temps écoulé"
748
749
#: views/admin/export/process.php:31
750
msgid "Exported"
751
- msgstr "Eksportuotas"
752
753
#: views/admin/export/process.php:36
754
msgid "Export Complete!"
755
- msgstr "Exportation terminée."
756
757
#: views/admin/export/process.php:37
758
msgid "WP All Export successfully exported your data!"
759
- msgstr "WP toute exportation exporté avec succès vos données!"
760
761
#: views/admin/export/process.php:38
762
msgid "Download Data"
@@ -765,7 +765,7 @@ msgstr "Télécharger de nouvelles données…"
765
#: views/admin/export/process.php:45 views/admin/manage/index.php:139
766
#: views/admin/manage/index.php:145
767
msgid "Bundle"
768
- msgstr "Carton pour vrac"
769
770
#: views/admin/export/process.php:46
771
msgid "Settings & Data for WP All Import"
@@ -855,7 +855,7 @@ msgstr "Auto Generate"
855
856
#: views/admin/export/template.php:249
857
msgid "Edit Export Field"
858
- msgstr "Modifier l'exportation champs"
859
860
#: views/admin/export/template/new_field_cpt.php:4
861
#: views/admin/export/template/new_field_shop_order.php:4
@@ -899,7 +899,7 @@ msgstr "Images & Média"
899
900
#: views/admin/export/template/new_field_cpt.php:17
901
msgid "Attachment"
902
- msgstr "Fixation"
903
904
#: views/admin/export/template/new_field_cpt.php:20
905
msgid "Post Status"
@@ -923,7 +923,7 @@ msgstr "Modèle"
923
924
#: views/admin/export/template/new_field_cpt.php:25
925
msgid "Parent"
926
- msgstr "Parente"
927
928
#: views/admin/export/template/new_field_cpt.php:26
929
msgid "Menu Order"
@@ -931,11 +931,11 @@ msgstr "Menu des commandes"
931
932
#: views/admin/export/template/new_field_cpt.php:27
933
msgid "Permalink"
934
- msgstr "Percaline"
935
936
#: views/admin/export/template/new_field_cpt.php:32
937
msgid "WooCommerce Data"
938
- msgstr "WooCommerce données"
939
940
#: views/admin/export/template/new_field_cpt.php:33
941
msgid "WooCommerce Taxonomies"
@@ -954,7 +954,7 @@ msgstr "Champs personnalités avancés"
954
#: views/admin/export/template/new_field_shop_order.php:19
955
#: views/admin/export/template/new_field_user.php:35
956
msgid "SQL Query"
957
- msgstr "requête SQL"
958
959
#: views/admin/export/template/new_field_cpt.php:52
960
#: views/admin/export/template/new_field_cpt.php:56
@@ -991,7 +991,7 @@ msgstr "URL de l'image d'exportation"
991
992
#: views/admin/export/template/new_field_cpt.php:88
993
msgid "Export Image Filenames"
994
- msgstr "Exporter l'image noms de fichiers"
995
996
#: views/admin/export/template/new_field_cpt.php:89
997
msgid "Export Image File Paths"
@@ -1095,7 +1095,7 @@ msgstr "Date d’inscription"
1095
1096
#: views/admin/export/template/new_field_user.php:14
1097
msgid "Nicename"
1098
- msgstr "Joli nom"
1099
1100
#: views/admin/export/template/new_field_user.php:15
1101
msgid "URL"
@@ -1135,7 +1135,7 @@ msgstr "Champ personnalisé / Meta utilisateur"
1135
1136
#: views/admin/help/index.php:1
1137
msgid "WP All Export Support"
1138
- msgstr "WP Tout Appui à l'exportation"
1139
1140
#: views/admin/manage/bulk.php:10
1141
#, php-format
@@ -1153,7 +1153,7 @@ msgstr "Voulez-vous vraiment supprimer <strong>%s</strong> ?"
1153
1154
#: views/admin/manage/index.php:18 views/admin/manage/index.php:20
1155
msgid "Search Exports"
1156
- msgstr "Recherche exportations"
1157
1158
#: views/admin/manage/index.php:28
1159
msgid "Name"
@@ -1232,7 +1232,7 @@ msgstr "en cours de traitement avec cron"
1232
1233
#: views/admin/manage/index.php:277
1234
msgid "Export currently in progress"
1235
- msgstr "Exporter en cours"
1236
1237
#: views/admin/manage/index.php:291
1238
#, php-format
@@ -1260,15 +1260,15 @@ msgstr "Format d’article : %s"
1260
1261
#: views/admin/manage/index.php:303
1262
msgid "settings edited since last run"
1263
- msgstr "paramètres modifiés depuis la dernière course"
1264
1265
#: views/admin/manage/index.php:315
1266
msgid "Edit"
1267
- msgstr "Éditer"
1268
1269
#: views/admin/manage/index.php:316
1270
msgid "Run Export"
1271
- msgstr "Exécuter Export"
1272
1273
#: views/admin/manage/index.php:318
1274
msgid "Cancel Cron"
@@ -1303,7 +1303,7 @@ msgstr "URL du fichier d'exportation"
1303
1304
#: views/admin/manage/scheduling.php:20
1305
msgid "Import Bundle URL"
1306
- msgstr "Importer Bundle URL"
1307
1308
#: views/admin/manage/scheduling.php:25
1309
msgid "Trigger Script"
2
msgstr ""
3
"Project-Id-Version: WP All Export\n"
4
"POT-Creation-Date: 2015-10-05 22:42-0600\n"
5
+ "PO-Revision-Date: 2016-06-15 09:58-0400\n"
6
"Language-Team: \n"
7
"MIME-Version: 1.0\n"
8
"Content-Type: text/plain; charset=UTF-8\n"
9
"Content-Transfer-Encoding: 8bit\n"
10
+ "X-Generator: Poedit 1.8.6\n"
11
"X-Poedit-Basepath: .\n"
12
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
13
"X-Poedit-SourceCharset: UTF-8\n"
29
#: views/admin/export/process.php:9 views/admin/export/template.php:7
30
#: views/admin/manage/index.php:4 views/admin/settings/index.php:6
31
msgid "WP All Export"
32
+ msgstr "WP All Export"
33
34
#: actions/admin_menu.php:11
35
msgid "All Export"
41
42
#: actions/admin_menu.php:14
43
msgid "New Export"
44
+ msgstr "Nouvelle exportation"
45
46
#: actions/admin_menu.php:15 views/admin/export/process.php:51
47
#: views/admin/manage/index.php:5
228
#: actions/wp_loaded.php:77
229
#, php-format
230
msgid "Export #%s complete"
231
+ msgstr "Exportation complétée à %s"
232
233
#: actions/wp_loaded.php:82
234
#, php-format
291
292
#: controllers/admin/manage.php:155 views/admin/manage/index.php:292
293
msgid "Export canceled"
294
+ msgstr "Exportation annulée"
295
296
#: controllers/admin/manage.php:221
297
msgid "Export deleted"
298
+ msgstr "Exportation supprimée"
299
300
#: controllers/admin/manage.php:249
301
#, php-format
481
#: libraries/XmlExportWooCommerceOrder.php:72
482
#: libraries/XmlExportWooCommerceOrder.php:954
483
msgid "Order Status"
484
+ msgstr "État de la commande"
485
486
#: libraries/XmlExportWooCommerceOrder.php:73
487
#: libraries/XmlExportWooCommerceOrder.php:955
491
#: libraries/XmlExportWooCommerceOrder.php:74
492
#: libraries/XmlExportWooCommerceOrder.php:956
493
msgid "Payment Method"
494
+ msgstr "Méthode de paiement"
495
496
#: libraries/XmlExportWooCommerceOrder.php:75
497
#: libraries/XmlExportWooCommerceOrder.php:957
620
621
#: views/admin/export/index.php:33
622
msgid "Specific Post Type"
623
+ msgstr "Type de donnée spécifique"
624
625
#: views/admin/export/index.php:37
626
msgid "WP_Query Results"
659
660
#: views/admin/export/options.php:43
661
msgid "Your export is ready to run."
662
+ msgstr "Votre exportation est prête à être lancée."
663
664
#: views/admin/export/options.php:45
665
#, php-format
666
msgid "WP All Export will export %d %s."
667
+ msgstr "WP All Export exportera %d %s."
668
669
#: views/admin/export/options.php:54 views/admin/export/options.php:227
670
msgid "Confirm & Run Export"
671
+ msgstr "Confirmer et exécuter l'exportation"
672
673
#: views/admin/export/options.php:70
674
msgid "Filters"
676
677
#: views/admin/export/options.php:185
678
msgid "Advanced Export"
679
+ msgstr "Exportation avancée"
680
681
#: views/admin/export/options.php:195
682
msgid "Include BOM in export file"
704
"server's timeout settings. If your export fails before completion, to "
705
"troubleshoot you should lower this number."
706
msgstr ""
707
+ "WP All Export doit être en mesure de traiter ces nombreux enregistrements en "
708
+ "moins les paramètres de délai d'attente de votre serveur. Si votre "
709
+ "exportation échoue avant la fin, pour résoudre les problèmes que vous "
710
+ "devriez réduire ce nombre."
711
712
#: views/admin/export/options.php:206
713
msgid "Friendly Name:"
744
745
#: views/admin/export/process.php:29
746
msgid "Time Elapsed"
747
+ msgstr "Temps écoulé"
748
749
#: views/admin/export/process.php:31
750
msgid "Exported"
751
+ msgstr "Exportation"
752
753
#: views/admin/export/process.php:36
754
msgid "Export Complete!"
755
+ msgstr "Exportation terminée"
756
757
#: views/admin/export/process.php:37
758
msgid "WP All Export successfully exported your data!"
759
+ msgstr "WP All Export a exporté avec succès vos données!"
760
761
#: views/admin/export/process.php:38
762
msgid "Download Data"
765
#: views/admin/export/process.php:45 views/admin/manage/index.php:139
766
#: views/admin/manage/index.php:145
767
msgid "Bundle"
768
+ msgstr "Vrac"
769
770
#: views/admin/export/process.php:46
771
msgid "Settings & Data for WP All Import"
855
856
#: views/admin/export/template.php:249
857
msgid "Edit Export Field"
858
+ msgstr "Modifier les champs d'exportation"
859
860
#: views/admin/export/template/new_field_cpt.php:4
861
#: views/admin/export/template/new_field_shop_order.php:4
899
900
#: views/admin/export/template/new_field_cpt.php:17
901
msgid "Attachment"
902
+ msgstr "Fichier attaché"
903
904
#: views/admin/export/template/new_field_cpt.php:20
905
msgid "Post Status"
923
924
#: views/admin/export/template/new_field_cpt.php:25
925
msgid "Parent"
926
+ msgstr "Parent"
927
928
#: views/admin/export/template/new_field_cpt.php:26
929
msgid "Menu Order"
931
932
#: views/admin/export/template/new_field_cpt.php:27
933
msgid "Permalink"
934
+ msgstr "Permalien"
935
936
#: views/admin/export/template/new_field_cpt.php:32
937
msgid "WooCommerce Data"
938
+ msgstr "WooCommerce Données"
939
940
#: views/admin/export/template/new_field_cpt.php:33
941
msgid "WooCommerce Taxonomies"
954
#: views/admin/export/template/new_field_shop_order.php:19
955
#: views/admin/export/template/new_field_user.php:35
956
msgid "SQL Query"
957
+ msgstr "Requête SQL"
958
959
#: views/admin/export/template/new_field_cpt.php:52
960
#: views/admin/export/template/new_field_cpt.php:56
991
992
#: views/admin/export/template/new_field_cpt.php:88
993
msgid "Export Image Filenames"
994
+ msgstr "Exporter les noms de fichiers des images"
995
996
#: views/admin/export/template/new_field_cpt.php:89
997
msgid "Export Image File Paths"
1095
1096
#: views/admin/export/template/new_field_user.php:14
1097
msgid "Nicename"
1098
+ msgstr "Nicename"
1099
1100
#: views/admin/export/template/new_field_user.php:15
1101
msgid "URL"
1135
1136
#: views/admin/help/index.php:1
1137
msgid "WP All Export Support"
1138
+ msgstr "WP All Export soutien"
1139
1140
#: views/admin/manage/bulk.php:10
1141
#, php-format
1153
1154
#: views/admin/manage/index.php:18 views/admin/manage/index.php:20
1155
msgid "Search Exports"
1156
+ msgstr "Rechercher exportations"
1157
1158
#: views/admin/manage/index.php:28
1159
msgid "Name"
1232
1233
#: views/admin/manage/index.php:277
1234
msgid "Export currently in progress"
1235
+ msgstr "Exportation en cours"
1236
1237
#: views/admin/manage/index.php:291
1238
#, php-format
1260
1261
#: views/admin/manage/index.php:303
1262
msgid "settings edited since last run"
1263
+ msgstr "paramètres modifiés depuis la dernière exécution"
1264
1265
#: views/admin/manage/index.php:315
1266
msgid "Edit"
1267
+ msgstr "Modifier"
1268
1269
#: views/admin/manage/index.php:316
1270
msgid "Run Export"
1271
+ msgstr "Exécuter l'exportation"
1272
1273
#: views/admin/manage/index.php:318
1274
msgid "Cancel Cron"
1303
1304
#: views/admin/manage/scheduling.php:20
1305
msgid "Import Bundle URL"
1306
+ msgstr "Importer URL en vrac"
1307
1308
#: views/admin/manage/scheduling.php:25
1309
msgid "Trigger Script"
libraries/XmlCsvExport.php CHANGED
@@ -22,7 +22,7 @@ final Class XmlCsvExport
22
private function __construct(){}
23
24
public static function export()
25
- {
26
switch ( XmlExportEngine::$exportOptions['export_to'] )
27
{
28
case 'xml':
@@ -41,6 +41,9 @@ final Class XmlCsvExport
41
42
public static function export_csv( $preview = false, $is_cron = false, $file_path = false, $exported_by_cron = 0 )
43
{
44
ob_start();
45
46
$stream = fopen("php://output", 'w');
@@ -109,6 +112,8 @@ final Class XmlCsvExport
109
110
endif;
111
112
if ($is_cron)
113
{
114
if ( ! $exported_by_cron )
@@ -131,13 +136,13 @@ final Class XmlCsvExport
131
self::merge_headers( PMXE_Plugin::$session->file, $headers );
132
}
133
}
134
- // [ \Prepare CSV headers ]
135
136
foreach ($articles as $article) {
137
$line = array();
138
foreach ($headers as $header) {
139
$line[$header] = ( isset($article[$header]) ) ? $article[$header] : '';
140
- }
141
fputcsv($stream, $line, XmlExportEngine::$exportOptions['delimiter']);
142
}
143
@@ -151,6 +156,8 @@ final Class XmlCsvExport
151
public static $node_xml_tag = '';
152
public static function export_xml( $preview = false, $is_cron = false, $file_path = false, $exported_by_cron = 0 )
153
{
154
require_once PMXE_ROOT_DIR . '/classes/XMLWriter.php';
155
156
$woo = array();
@@ -572,6 +579,8 @@ final Class XmlCsvExport
572
573
$out = fopen($file, 'w');
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']);
@@ -583,17 +592,20 @@ final Class XmlCsvExport
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);
597
fclose($out);
598
@unlink($tmp_file);
599
}
@@ -687,10 +699,10 @@ final Class XmlCsvExport
687
foreach ($available_sections as $slug => $section)
688
{
689
if ( ! empty($section['content']) and ! empty($available_data[$section['content']]))
690
- {
691
foreach ($available_data[$section['content']] as $field)
692
- {
693
- if (isset($field['auto']) or ! in_array('product', $post['cpt']) )
694
{
695
$auto_generate['ids'][] = 1;
696
$auto_generate['cc_label'][] = is_array($field) ? $field['label'] : $field;
@@ -703,9 +715,45 @@ final Class XmlCsvExport
703
$auto_generate['cc_value'][] = is_array($field) ? $field['label'] : $field;
704
$auto_generate['cc_name'][] = is_array($field) ? $field['name'] : $field;
705
}
706
}
707
- }
708
- }
709
710
if ( XmlExportWooCommerceOrder::$is_active ) {
711
foreach (XmlExportWooCommerceOrder::$order_sections as $slug => $section) {
22
private function __construct(){}
23
24
public static function export()
25
+ {
26
switch ( XmlExportEngine::$exportOptions['export_to'] )
27
{
28
case 'xml':
41
42
public static function export_csv( $preview = false, $is_cron = false, $file_path = false, $exported_by_cron = 0 )
43
{
44
+
45
+ if ( XmlExportEngine::$exportOptions['delimiter'] == '\t' ) XmlExportEngine::$exportOptions['delimiter'] = "\t";
46
+
47
ob_start();
48
49
$stream = fopen("php://output", 'w');
112
113
endif;
114
115
+ $headers = apply_filters( 'wp_all_export_csv_headers', $headers, XmlExportEngine::$exportID );
116
+
117
if ($is_cron)
118
{
119
if ( ! $exported_by_cron )
136
self::merge_headers( PMXE_Plugin::$session->file, $headers );
137
}
138
}
139
+ // [ \Prepare CSV headers ]
140
141
foreach ($articles as $article) {
142
$line = array();
143
foreach ($headers as $header) {
144
$line[$header] = ( isset($article[$header]) ) ? $article[$header] : '';
145
+ }
146
fputcsv($stream, $line, XmlExportEngine::$exportOptions['delimiter']);
147
}
148
156
public static $node_xml_tag = '';
157
public static function export_xml( $preview = false, $is_cron = false, $file_path = false, $exported_by_cron = 0 )
158
{
159
+ if ( XmlExportEngine::$exportOptions['delimiter'] == '\t' ) XmlExportEngine::$exportOptions['delimiter'] = "\t";
160
+
161
require_once PMXE_ROOT_DIR . '/classes/XMLWriter.php';
162
163
$woo = array();
579
580
$out = fopen($file, 'w');
581
582
+ $headers = apply_filters('wp_all_export_csv_headers', $headers, XmlExportEngine::$exportID);
583
+
584
if ( XmlExportEngine::$exportOptions['include_bom'] )
585
{
586
fputcsv($out, chr(0xEF).chr(0xBB).chr(0xBF) . array_map(array('XmlCsvExport', '_get_valid_header_name'), $headers), XmlExportEngine::$exportOptions['delimiter']);
592
593
$exclude_old_headers = fgetcsv($in);
594
595
+ if (is_resource($in))
596
+ {
597
+ while ( ! feof($in) ) {
598
+ $data = fgetcsv($in, 0, XmlExportEngine::$exportOptions['delimiter']);
599
+ if ( empty($data) ) continue;
600
+ $data_assoc = array_combine($old_headers, array_values($data));
601
+ $line = array();
602
+ foreach ($headers as $header) {
603
+ $line[$header] = ( isset($data_assoc[$header]) ) ? $data_assoc[$header] : '';
604
+ }
605
+ fputcsv($out, $line, XmlExportEngine::$exportOptions['delimiter']);
606
+ }
607
+ fclose($in);
608
+ }
609
fclose($out);
610
@unlink($tmp_file);
611
}
699
foreach ($available_sections as $slug => $section)
700
{
701
if ( ! empty($section['content']) and ! empty($available_data[$section['content']]))
702
+ {
703
foreach ($available_data[$section['content']] as $field)
704
+ {
705
+ if ( is_array($field) and (isset($field['auto']) or ! in_array('product', $post['cpt']) ))
706
{
707
$auto_generate['ids'][] = 1;
708
$auto_generate['cc_label'][] = is_array($field) ? $field['label'] : $field;
715
$auto_generate['cc_value'][] = is_array($field) ? $field['label'] : $field;
716
$auto_generate['cc_name'][] = is_array($field) ? $field['name'] : $field;
717
}
718
+ }
719
+ }
720
+ if ( ! empty($section['additional']) )
721
+ {
722
+ foreach ($section['additional'] as $sub_slug => $sub_section)
723
+ {
724
+ foreach ($sub_section['meta'] as $field)
725
+ {
726
+ $field_options = ( in_array($sub_slug, array('images', 'attachments')) ) ? esc_attr('{"is_export_featured":true,"is_export_attached":true,"image_separator":"|"}') : '0';
727
+ $field_name = '';
728
+ switch ($sub_slug) {
729
+ case 'images':
730
+ $field_name = 'Image ' . $field['name'];
731
+ break;
732
+ case 'attachments':
733
+ $field_name = 'Attachment ' . $field['name'];
734
+ break;
735
+ default:
736
+ $field_name = $field['name'];
737
+ break;
738
+ }
739
+
740
+ if ( is_array($field) and isset($field['auto']) )
741
+ {
742
+ $auto_generate['ids'][] = 1;
743
+ $auto_generate['cc_label'][] = is_array($field) ? $field['label'] : $field;
744
+ $auto_generate['cc_php'][] = 0;
745
+ $auto_generate['cc_code'][] = '';
746
+ $auto_generate['cc_sql'][] = '';
747
+ $auto_generate['cc_settings'][] = '';
748
+ $auto_generate['cc_type'][] = is_array($field) ? $field['type'] : $sub_slug;
749
+ $auto_generate['cc_options'][] = $field_options;
750
+ $auto_generate['cc_value'][] = is_array($field) ? $field['label'] : $field;
751
+ $auto_generate['cc_name'][] = $field_name;
752
+ }
753
+ }
754
}
755
+ }
756
+ }
757
758
if ( XmlExportWooCommerceOrder::$is_active ) {
759
foreach (XmlExportWooCommerceOrder::$order_sections as $slug => $section) {
libraries/XmlExportACF.php CHANGED
@@ -573,8 +573,9 @@ if ( ! class_exists('XmlExportACF') )
573
574
if ($acf and version_compare($acf->settings['version'], '5.0.0') >= 0)
575
{
576
- $v = $row['value'][ $row['i'] ][ $sub_field['key'] ];
577
-
578
if ($is_xml_export) $v = acf_format_value($v, $row['post_id'], $sub_field);
579
}
580
else
573
574
if ($acf and version_compare($acf->settings['version'], '5.0.0') >= 0)
575
{
576
+ $v = $row['value'][ $row['i'] ][ $sub_field['key'] ];
577
+ $cache_slug = "format_value/post_id=".$row['post_id']."/name={$sub_field['name']}";
578
+ wp_cache_delete($cache_slug, 'acf');
579
if ($is_xml_export) $v = acf_format_value($v, $row['post_id'], $sub_field);
580
}
581
else
libraries/XmlExportCpt.php CHANGED
@@ -154,16 +154,16 @@ final class XmlExportCpt
154
switch ($fieldSettings)
155
{
156
case 'unix':
157
- $post_date = get_post_time('U', true);
158
break;
159
default:
160
- $post_date = date($fieldSettings, get_post_time('U', true));
161
break;
162
}
163
}
164
else
165
{
166
- $post_date = date("Ymd", get_post_time('U', true));
167
}
168
169
wp_all_export_write_article( $article, $element_name, apply_filters('pmxe_post_date', pmxe_filter($post_date, $fieldSnipped), $entry->ID) );
154
switch ($fieldSettings)
155
{
156
case 'unix':
157
+ $post_date = get_post_time('U', true, $entry->ID);
158
break;
159
default:
160
+ $post_date = date($fieldSettings, get_post_time('U', true, $entry->ID));
161
break;
162
}
163
}
164
else
165
{
166
+ $post_date = date("Ymd", get_post_time('U', true, $entry->ID));
167
}
168
169
wp_all_export_write_article( $article, $element_name, apply_filters('pmxe_post_date', pmxe_filter($post_date, $fieldSnipped), $entry->ID) );
libraries/XmlExportEngine.php CHANGED
@@ -177,7 +177,8 @@ if ( ! class_exists('XmlExportEngine') ){
177
array(
178
'name' => 'URL',
179
'label' => 'url',
180
- 'type' => 'image_url'
181
),
182
array(
183
'name' => 'Filename',
@@ -197,22 +198,26 @@ if ( ! class_exists('XmlExportEngine') ){
197
array(
198
'name' => 'Title',
199
'label' => 'title',
200
- 'type' => 'image_title'
201
),
202
array(
203
'name' => 'Caption',
204
'label' => 'caption',
205
- 'type' => 'image_caption'
206
),
207
array(
208
'name' => 'Description',
209
'label' => 'description',
210
- 'type' => 'image_description'
211
),
212
array(
213
'name' => 'Alt Text',
214
'label' => 'alt',
215
- 'type' => 'image_alt'
216
),
217
)
218
),
@@ -222,7 +227,8 @@ if ( ! class_exists('XmlExportEngine') ){
222
array(
223
'name' => 'URL',
224
'label' => 'url',
225
- 'type' => 'attachment_url'
226
),
227
array(
228
'name' => 'Filename',
@@ -403,7 +409,8 @@ if ( ! class_exists('XmlExportEngine') ){
403
else
404
{
405
remove_all_actions('parse_query');
406
- remove_all_actions('pre_get_posts');
407
408
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
409
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
@@ -446,7 +453,8 @@ if ( ! class_exists('XmlExportEngine') ){
446
else
447
{
448
remove_all_actions('parse_query');
449
- remove_all_actions('pre_get_posts');
450
451
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
452
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
177
array(
178
'name' => 'URL',
179
'label' => 'url',
180
+ 'type' => 'image_url',
181
+ 'auto' => 1
182
),
183
array(
184
'name' => 'Filename',
198
array(
199
'name' => 'Title',
200
'label' => 'title',
201
+ 'type' => 'image_title',
202
+ 'auto' => 1
203
),
204
array(
205
'name' => 'Caption',
206
'label' => 'caption',
207
+ 'type' => 'image_caption',
208
+ 'auto' => 1
209
),
210
array(
211
'name' => 'Description',
212
'label' => 'description',
213
+ 'type' => 'image_description',
214
+ 'auto' => 1
215
),
216
array(
217
'name' => 'Alt Text',
218
'label' => 'alt',
219
+ 'type' => 'image_alt',
220
+ 'auto' => 1
221
),
222
)
223
),
227
array(
228
'name' => 'URL',
229
'label' => 'url',
230
+ 'type' => 'attachment_url',
231
+ 'auto' => 1
232
),
233
array(
234
'name' => 'Filename',
409
else
410
{
411
remove_all_actions('parse_query');
412
+ remove_all_actions('pre_get_posts');
413
+ remove_all_filters('posts_clauses');
414
415
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
416
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
453
else
454
{
455
remove_all_actions('parse_query');
456
+ remove_all_actions('pre_get_posts');
457
+ remove_all_filters('posts_clauses');
458
459
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
460
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
libraries/XmlExportMediaGallery.php CHANGED
@@ -90,24 +90,6 @@ final class XmlExportMediaGallery
90
// prepare attached images data
91
if ( empty($options) or ! empty($options['is_export_attached']) )
92
{
93
- $images = get_posts( array(
94
- 'post_type' => 'attachment',
95
- 'posts_per_page' => -1,
96
- 'post_parent' => self::$pid,
97
- ) );
98
-
99
- if ( ! empty($images)):
100
-
101
- foreach ($images as $image)
102
- {
103
- if ( wp_attachment_is_image( $image->ID ) and ( empty(self::$featured_image) or self::$featured_image->ID != $image->ID ) )
104
- {
105
- self::$images[] = $image;
106
- self::$images_ids[] = $image->ID;
107
- }
108
- }
109
-
110
- endif;
111
112
$_gallery = get_post_meta(self::$pid, '_product_image_gallery', true);
113
@@ -130,7 +112,26 @@ final class XmlExportMediaGallery
130
}
131
}
132
}
133
- }
134
}
135
136
break;
@@ -265,7 +266,7 @@ final class XmlExportMediaGallery
265
case 'image_title':
266
$field_options = json_decode($options['cc_options'][$ID], true);
267
if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
268
- {
269
$templateOptions['set_image_meta_title'] = 1;
270
$templateOptions['image_meta_title_delim'] = (empty($field_options['image_separator'])) ? "|" : $field_options['image_separator'];
271
if ( empty($templateOptions['image_meta_title'])) {
90
// prepare attached images data
91
if ( empty($options) or ! empty($options['is_export_attached']) )
92
{
93
94
$_gallery = get_post_meta(self::$pid, '_product_image_gallery', true);
95
112
}
113
}
114
}
115
+ }
116
+
117
+ $images = get_posts( array(
118
+ 'post_type' => 'attachment',
119
+ 'posts_per_page' => -1,
120
+ 'post_parent' => self::$pid,
121
+ ) );
122
+
123
+ if ( ! empty($images)):
124
+
125
+ foreach ($images as $image)
126
+ {
127
+ if ( wp_attachment_is_image( $image->ID ) and ( empty(self::$featured_image) or self::$featured_image->ID != $image->ID ) )
128
+ {
129
+ self::$images[] = $image;
130
+ self::$images_ids[] = $image->ID;
131
+ }
132
+ }
133
+
134
+ endif;
135
}
136
137
break;
266
case 'image_title':
267
$field_options = json_decode($options['cc_options'][$ID], true);
268
if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
269
+ {
270
$templateOptions['set_image_meta_title'] = 1;
271
$templateOptions['image_meta_title_delim'] = (empty($field_options['image_separator'])) ? "|" : $field_options['image_separator'];
272
if ( empty($templateOptions['image_meta_title'])) {
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.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.
@@ -78,6 +78,16 @@ Either: -
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
1
=== Export WordPress data to XML/CSV ===
2
Contributors: soflyy, wpallimport
3
Requires at least: 4.1
4
+ Tested up to: 4.6
5
+ Stable tag: 1.0.7
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.
78
79
== Changelog ==
80
81
+ = 1.0.7 =
82
+ * fixed db schema for multisite
83
+ * fixed export order items date
84
+ * fixed media items export ordering
85
+ * fixed import template for media items
86
+ * fixed export ACF repeater in XML format
87
+ * added new filter 'wp_all_export_csv_headers'
88
+ * added possibility to use tab as csv delimiter "\t"
89
+ * updated french translation
90
+
91
= 1.0.6 =
92
* added new filters 'wp_all_export_is_wrap_value_into_cdata', 'wp_all_export_add_before_element', 'wp_all_export_add_after_element'
93
* added 'WPML Translation ID' element to available data
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.6
7
Author: Soflyy
8
*/
9
@@ -50,7 +50,7 @@ else {
50
*/
51
define('PMXE_PREFIX', 'pmxe_');
52
53
- define('PMXE_VERSION', '1.0.6');
54
55
define('PMXE_EDITION', 'free');
56
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.7
7
Author: Soflyy
8
*/
9
50
*/
51
define('PMXE_PREFIX', 'pmxe_');
52
53
+ define('PMXE_VERSION', '1.0.7');
54
55
define('PMXE_EDITION', 'free');
56