| Server IP : 172.67.201.108 / Your IP : 216.73.216.25 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/home2/domains/siparentBAK/wp-content/plugins/eventON-bak/ |
Upload File : |
<?php
/**
* EventON Uninstall
*
* Uninstalling EventON deletes everything.
*
* @author AJDE
* @category Core
* @package EventON/Uninstaller
* @version 2.6.8
*/
if(defined( 'WP_UNINSTALL_PLUGIN' )){
$evo_opt = get_option('evcal_options_evcal_1');
// If options have been stored, and 'evo_donot_delete' is equal to 'yes' - exit.
if(!empty($evo_opt['evo_donot_delete']) && $evo_opt['evo_donot_delete']=='yes'){
// DO not delete any eventON items
}else{
global $wpdb, $wp_roles;
// Delete pages
wp_trash_post( get_option( 'evo_event_archive_page_id' ) );
// Delete options
$wpdb->query("DELETE FROM $wpdb->options WHERE
option_name LIKE '%evcal_%'
OR option_name LIKE '%_evo_%'
OR option_name LIKE '%eventon_%';");
// Delete posts + data.
$wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type IN ( 'ajde_events', 'evo-reviews', 'evo-rsvp', 'evo-tix', 'evo-subscriber' );" );
$wpdb->query( "DELETE meta FROM {$wpdb->postmeta} meta LEFT JOIN {$wpdb->posts} posts ON posts.ID = meta.post_id WHERE posts.ID IS NULL;" );
// Delete term taxonomies
foreach ( array( 'event_type', 'event_type_2', 'event_type_3', 'event_location','event_organizer' ) as $taxonomy ) {
$wpdb->delete(
$wpdb->term_taxonomy,
array(
'taxonomy' => $taxonomy,
)
);
}
// Delete orphan term meta
if ( ! empty( $wpdb->termmeta ) ) {
$wpdb->query( "DELETE tm FROM {$wpdb->termmeta} tm LEFT JOIN {$wpdb->term_taxonomy} tt ON tm.term_id = tt.term_id WHERE tt.term_id IS NULL;" );
}
wp_cache_flush();
}
}