PluginProbe
Online Active Users / trunk
Online Active Users vtrunk
3.4.4 3.4.3 3.4.2 3.4.1 3.4 trunk 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3
online-active-users / uninstall.php

uninstall.php in Online Active Users trunk, at uninstall.php

27 lines 598 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Uninstall handler: removes plugin transients and options.
4 *
5 * @package Online_Active_Users
6 */
7
8 // If uninstall is not called from WordPress, exit.
9 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
10 exit();
11 }
12
13 // Delete plugin transient.
14 delete_transient( 'users_status' );
15
16 // Delete all custom transients.
17 $wpoau_stored_keys = get_option( 'wpoau_transient_keys', array() );
18 if ( ! empty( $wpoau_stored_keys ) ) {
19 foreach ( $wpoau_stored_keys as $wpoau_key ) {
20 delete_transient( $wpoau_key );
21 }
22 delete_option( 'wpoau_transient_keys' );
23 }
24
25 // Optional: Clear cache.
26 wp_cache_flush();
27