PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / trunk
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel vtrunk
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / actions / pmxe_before_export.php
wp-all-export / actions Last commit date
admin_head.php 3 weeks ago admin_init.php 3 weeks ago admin_menu.php 3 weeks ago admin_notices.php 3 weeks ago init.php 3 weeks ago pmxe_after_export.php 3 weeks ago pmxe_before_export.php 3 weeks ago pmxe_exported_post.php 3 weeks ago wp_ajax_dismiss_export_warnings.php 3 weeks ago wp_ajax_dismiss_review_modal.php 3 weeks ago wp_ajax_dismiss_warnings.php 3 weeks ago wp_ajax_generate_zapier_api_key.php 3 weeks ago wp_ajax_redirect_after_addon_installed.php 3 weeks ago wp_ajax_save_scheduling.php 3 weeks ago wp_ajax_scheduling_dialog_content.php 3 weeks ago wp_ajax_scheduling_subscribe_dialog_content.php 3 weeks ago wp_ajax_send_feedback.php 3 weeks ago wp_ajax_wpae_available_rules.php 3 weeks ago wp_ajax_wpae_filtering.php 3 weeks ago wp_ajax_wpae_filtering_count.php 3 weeks ago wp_ajax_wpae_get_scheduling_connection_icon.php 3 weeks ago wp_ajax_wpae_preview.php 3 weeks ago wp_ajax_wpae_upgrade_notice.php 3 weeks ago wp_ajax_wpallexport.php 3 weeks ago wp_loaded.php 3 weeks ago wpmu_new_blog.php 3 weeks ago
pmxe_before_export.php
45 lines
1 <?php
2
3 defined( 'ABSPATH' ) || exit;
4
5
6 function pmxe_pmxe_before_export($export_id)
7 {
8 $export = new PMXE_Export_Record();
9 $export->getById($export_id);
10
11 if ( ! $export->isEmpty() )
12 {
13 if ( ! $export->options['export_only_new_stuff'] )
14 {
15 $postList = new PMXE_Post_List();
16 $missingPosts = $postList->getBy(array('export_id' => $export_id, 'iteration !=' => --$export->iteration));
17 $missing_ids = array();
18 if ( ! $missingPosts->isEmpty() ):
19
20 foreach ($missingPosts as $missingPost)
21 {
22 $missing_ids[] = (int) $missingPost['post_id'];
23 }
24
25 endif;
26
27 if ( ! empty($missing_ids))
28 {
29 global $wpdb;
30 // Delete records form pmxe_posts
31 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $sql composed of $wpdb->prefix-derived table name and int-cast post id list; export_id bound via prepare() below
32 $sql = "DELETE FROM " . PMXE_Plugin::getInstance()->getTablePrefix() . "posts WHERE post_id IN (" . implode(',', $missing_ids) . ") AND export_id = %d";
33 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,PluginCheck.Security.DirectDB.UnescapedDBParameter -- plugin-owned pmxe_posts table cleanup; $sql composed of $wpdb->prefix-derived table name + int-cast post ids, export_id bound via prepare()
34 $wpdb->query( $wpdb->prepare( $sql, $export->id ) );
35 }
36 }
37
38 if ( empty($export->parent_id) )
39 {
40 delete_option( 'wp_all_export_queue_' . $export->id );
41 }
42
43 delete_option( 'wp_all_export_acf_flexible_' . $export->id );
44 }
45 }