PluginProbe
Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades / trunk
Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades vtrunk
trunk 1.0 1.1 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 11.0 11.0.1 11.1 11.2 11.3 11.3.1 11.4 11.5 11.6 11.7 11.7.1 11.8 All 143 releases
youtube-embed-plus / uninstall.php

uninstall.php in Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades trunk, at uninstall.php

28 lines 771 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // if uninstall.php is not called by WordPress, die
4 if (!defined('WP_UNINSTALL_PLUGIN'))
5 {
6 die;
7 }
8
9 // if the option to do this is checked
10 $all_yt_options = get_option('youtubeprefs_alloptions');
11 if (!empty($all_yt_options['uninstall_data']))
12 {
13 global $wpdb;
14
15 // delete main options
16 delete_option('youtubeprefs_alloptions');
17
18 // delete backup options
19 $backup_plugin_options = $wpdb->get_results("SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'youtubeprefs\_alloptions\_backup\_%'");
20 foreach ($backup_plugin_options as $option)
21 {
22 delete_option($option->option_name);
23 }
24
25 // delete vi data
26 $vi_table_name = $wpdb->prefix . 'vi_consent_logs';
27 $wpdb->query("DROP TABLE IF EXISTS $vi_table_name");
28 }