PluginProbe
Insert Html Snippet / trunk
Insert Html Snippet vtrunk
1.4.6 trunk 1.0 1.0.1 1.1 1.1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.4 1.4.1 1.4.2 1.4.3 All 27 releases
insert-html-snippet / admin / uninstall.php

uninstall.php in Insert Html Snippet trunk, at admin/uninstall.php

44 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) )
3 exit;
4
5 function xyz_ihs_network_uninstall($networkwide) {
6 global $wpdb;
7
8 if (function_exists('is_multisite') && is_multisite()) {
9 // check if it is a network activation - if so, run the activation function for each blog id
10 if ($networkwide) {
11 $old_blog = $wpdb->blogid;
12 // Get all blog ids
13 $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
14 foreach ($blogids as $blog_id) {
15 switch_to_blog($blog_id);
16 xyz_ihs_uninstall();
17 }
18 switch_to_blog($old_blog);
19 return;
20 }
21 }
22 xyz_ihs_uninstall();
23 }
24
25 function xyz_ihs_uninstall(){
26
27 global $wpdb;
28 delete_option("xyz_ihs_sort_order");
29 delete_option("xyz_ihs_sort_field_name");
30 delete_option("xyz_ihs_limit");
31 delete_option("xyz_ihs_installed_date");
32 delete_option('xyz_ihs_credit_dismiss');
33 delete_option('xyz_ihs_premium_version_ads');
34 delete_option('xyz_ihs_exec_in_editor');
35 delete_option('xyz_ihs_free_version');
36 delete_option('xyz_ihs_sync_needed');
37 delete_option('xyz_ihs_show_snippet_usage');
38 /* table delete*/
39 $wpdb->query("DROP TABLE ".$wpdb->prefix."xyz_ihs_short_code");
40 $wpdb->query("DROP TABLE ".$wpdb->prefix."xyz_ihs_usage");
41 }
42 register_uninstall_hook( XYZ_INSERT_HTML_PLUGIN_FILE, 'xyz_ihs_network_uninstall' );
43 ?>
44