PluginProbe
SQLite Object Cache / trunk
SQLite Object Cache vtrunk
1.6.5 trunk 0.1.7 1.0.0 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.4.0 1.4.1 1.5.1 1.5.4 1.5.5 1.5.6 1.5.7 All 30 releases
sqlite-object-cache / uninstall.php

uninstall.php in SQLite Object Cache trunk, at uninstall.php

26 lines 762 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This file runs when the plugin in uninstalled (deleted).
4 *
5 * @package SQLite Object Cache.
6 */
7
8 // If plugin is not being uninstalled, exit (do nothing).
9 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
10 exit;
11 }
12 if ( is_multisite() ) {
13 foreach ( get_sites( array( 'number' => 0, 'fields' => 'ids', 'no_found_rows' => true, 'orderby' => false ) ) as $sqlite_object_cache_site_id ) {
14 try {
15 switch_to_blog( $sqlite_object_cache_site_id );
16 delete_option( 'sqlite_object_cache_settings' );
17 delete_option( 'sqlite_object_cache_version' );
18 } catch ( Exception $ex ) {
19 /* Empty, intentionally. Avoid crashes on asset clearing. */
20 } finally {
21 restore_current_blog();
22 }
23 }
24 }
25 unset ( $sqlite_object_cache_site_id );
26