HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/www/wp-content/plugins/youtube-embed-plus/uninstall.php
<?php

// if uninstall.php is not called by WordPress, die
if (!defined('WP_UNINSTALL_PLUGIN'))
{
    die;
}

// if the option to do this is checked
$all_yt_options = get_option('youtubeprefs_alloptions');
if (!empty($all_yt_options['uninstall_data']))
{
    global $wpdb;

    // delete main options
    delete_option('youtubeprefs_alloptions');

    // delete backup options
    $backup_plugin_options = $wpdb->get_results("SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'youtubeprefs\_alloptions\_backup\_%'");
    foreach ($backup_plugin_options as $option)
    {
        delete_option($option->option_name);
    }

    // delete vi data
    $vi_table_name = $wpdb->prefix . 'vi_consent_logs';
    $wpdb->query("DROP TABLE IF EXISTS $vi_table_name");
}