| Server IP : 172.67.134.116 / Your IP : 216.73.216.140 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/www/wp-content/plugins/wp-all-export/actions/ |
Upload File : |
<?php
function pmxe_pmxe_before_export($export_id)
{
$export = new PMXE_Export_Record();
$export->getById($export_id);
if ( ! $export->isEmpty() )
{
if ( ! $export->options['export_only_new_stuff'] )
{
$postList = new PMXE_Post_List();
$missingPosts = $postList->getBy(array('export_id' => $export_id, 'iteration !=' => --$export->iteration));
$missing_ids = array();
if ( ! $missingPosts->isEmpty() ):
foreach ($missingPosts as $missingPost)
{
$missing_ids[] = $missingPost['post_id'];
}
endif;
if ( ! empty($missing_ids))
{
global $wpdb;
// Delete records form pmxe_posts
$sql = "DELETE FROM " . PMXE_Plugin::getInstance()->getTablePrefix() . "posts WHERE post_id IN (" . implode(',', $missing_ids) . ") AND export_id = %d";
$wpdb->query(
$wpdb->prepare($sql, $export->id)
);
}
}
if ( empty($export->parent_id) )
{
delete_option( 'wp_all_export_queue_' . $export->id );
}
delete_option( 'wp_all_export_acf_flexible_' . $export->id );
}
}