Server : Apache System : Linux pod-100823:apache2_74:v0.5.7 5.4.0-1138-gcp #147~18.04.1-Ubuntu SMP Mon Oct 7 21:46:26 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33.7 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system Directory : /nas/content/live/attorneyexperi/wp-content/plugins/cookie-law-info/ |
<?php /** * Fired when the plugin is uninstalled. * * When populating this file, consider the following flow * of control: * * - This method should be static * - Check if the $_REQUEST content actually is the plugin name * - Run an admin referrer check to make sure it goes through authentication * - Verify the output of $_GET makes sense * - Repeat with other user roles. Best directly by using the links/query string parameters. * - Repeat things for multisite. Once for a single site in the network, once sitewide. * * This file may be updated more in future version of the Boilerplate; however, this is the * general skeleton and outline for how the file should work. * * For more information, see the following discussion: * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913 * * @link https://www.webtoffee.com/ * @since 3.0.0 * * @package CookieYes */ // If uninstall not called from WordPress, then exit. if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit; } if ( defined( 'CKY_REMOVE_ALL_DATA' ) && true === CKY_REMOVE_ALL_DATA ) { try { global $wpdb; $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'cky_banners' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'cky_cookie_categories' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'cky_cookies' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery $prefix = $wpdb->esc_like( '_transient_cky' ) . '%'; $keys = $wpdb->get_results( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", $prefix ), ARRAY_A ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery if ( ! is_wp_error( $keys ) ) { $transients = array_map( function( $key ) { return ltrim( $key['option_name'], '_transient_' ); }, $keys ); foreach ( $transients as $key ) { delete_transient( $key ); } } $options = array( 'cky_banners_table_version', 'cky_cookie_category_table_version', 'cky_cookie_table_version', 'cky_consent_table_version', 'cky_scan_details', 'cky_settings', 'cky_admin_notices', 'wt_cli_version', 'CookieLawInfo-0.9', 'cky_cookie_consent_lite_db_version', 'cky_missing_tables', 'cky_migration_options', ); foreach ( $options as $option_name ) { delete_option( $option_name ); } } catch ( Exception $e ) { error_log( __( 'Failed to delete CookieYes plugin data!', 'cookie-law-info' ) ); } }