| Server IP : 188.114.96.2 / Your IP : 104.23.243.200 Web Server : Apache/2.4.59 (Debian) System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : edlftp ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/nicolasj/www/b2b.ecoledelangues.be/wp-content/plugins/wpmudev-updates/ |
Upload File : |
<?php
/**
* Uninstall file.
*
* Cleanup plugin settings and transients if configured.
*
* @since 4.11.4
* @package WPMUDEV
*/
// If uninstall not called from WordPress exit.
defined( 'WP_UNINSTALL_PLUGIN' ) || exit();
// Get uninstall settings.
$keep_data = get_site_option( 'wdp_un_uninstall_keep_data' );
$keep_settings = get_site_option( 'wdp_un_uninstall_preserve_settings' );
global $wpdb;
if ( ! $keep_data && ! $keep_settings ) {
// Delete both settings and transients.
if ( is_multisite() ) {
$wpdb->query( "DELETE FROM {$wpdb->sitemeta} WHERE meta_key LIKE '%wdp_un_%'" ); // phpcs:ignore
} else {
$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '%wdp_un_%'" ); // phpcs:ignore
}
// Delete API key if everything needs to be cleaned.
delete_site_option( 'wpmudev_apikey' );
} elseif ( ! $keep_data ) {
// Delete transients.
if ( is_multisite() ) {
$wpdb->query( "DELETE FROM {$wpdb->sitemeta} WHERE meta_key LIKE '%_wdp_un_%'" ); // phpcs:ignore
} else {
$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '%_wdp_un_%'" ); // phpcs:ignore
}
// These are not settings, but data.
delete_site_option( 'wdp_un_membership_data' );
delete_site_option( 'wdp_un_remote_access' );
delete_site_option( 'wdp_un_updates_data' );
delete_site_option( 'wdp_un_translation_updates_available' );
delete_site_option( 'wdp_un_profile_data' );
delete_site_option( 'wdp_un_updates_available' );
delete_site_option( 'wdp_un_notifications' );
} elseif ( ! $keep_settings ) {
// Delete settings.
if ( is_multisite() ) {
$wpdb->query( "DELETE FROM {$wpdb->sitemeta} WHERE meta_key LIKE 'wdp_un_%' AND meta_key NOT LIKE '%_wdp_un_%'" ); // phpcs:ignore
} else {
$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wdp_un_%' AND option_name NOT LIKE '%_wdp_un_%'" ); // phpcs:ignore
}
}