PluginProbe
Code Embed / 2.6.3
Code Embed v2.6.3
2.6.4 2.6.3 2.6.2 2.6.1 trunk 1.0 1.1 1.2 1.3 1.4.1 1.5.1 1.6.1 2.0.2 2.1.2 2.2.2 2.3.9 2.4 2.5.1 2.5.2 2.6
simple-embed-code / uninstall.php

uninstall.php in Code Embed 2.6.3, at uninstall.php

41 lines 729 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Uninstaller
4 *
5 * Uninstall the plugin by removing any options from the database.
6 *
7 * @package simple-embed-code
8 */
9
10 // If the uninstall was not called by WordPress, exit.
11
12 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
13 exit;
14 }
15
16 // Delete any options.
17
18 if ( is_multisite() ) {
19
20 // Loop through every sub-site and remove its options.
21
22 $sites = get_sites(
23 array(
24 'fields' => 'ids',
25 ),
26 );
27
28 foreach ( $sites as $site_id ) {
29 switch_to_blog( $site_id );
30 delete_option( 'artiss_code_embed' );
31 delete_option( 'code_embed_version' );
32 restore_current_blog();
33 }
34 } else {
35
36 // Delete options for a single site installation.
37
38 delete_option( 'artiss_code_embed' );
39 delete_option( 'code_embed_version' );
40 }
41