PluginProbe ʕ •ᴥ•ʔ
WP Super Cache / 0.9.9.5
WP Super Cache v0.9.9.5
3.1.1 trunk 0.1 0.2 0.3 0.3.1 0.4 0.5 0.5.1 0.5.2 0.5.3 0.6.2 0.6.3 0.6.4 0.6.5 0.6.6 0.6.7 0.6.8 0.7 0.7.1 0.8 0.8.1 0.8.2 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 0.8.8 0.8.9 0.9 0.9.1 0.9.2 0.9.3 0.9.3.1 0.9.4 0.9.4.1 0.9.4.2 0.9.4.3 0.9.5 0.9.6 0.9.6.1 0.9.7 0.9.8 0.9.9 0.9.9.1 0.9.9.2 0.9.9.3 0.9.9.4 0.9.9.5 0.9.9.6 0.9.9.7 0.9.9.8 0.9.9.9 1.0 1.0.1 1.1 1.1.1 1.10.0 1.11.0 1.12.0 1.12.1 1.12.2 1.12.3 1.12.4 1.2 1.2.1 1.3 1.3.1 1.3.2 1.3.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.7.1 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8 1.9 1.9.1 1.9.2 1.9.3 1.9.4 2.0.0 2.0.1 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0
wp-super-cache / uninstall.php
wp-super-cache Last commit date
languages 16 years ago plugins 15 years ago Changelog.txt 15 years ago advanced-cache.php 17 years ago readme.txt 15 years ago uninstall.php 16 years ago wp-cache-base.php 18 years ago wp-cache-config-sample.php 15 years ago wp-cache-phase1.php 15 years ago wp-cache-phase2.php 15 years ago wp-cache.php 15 years ago wp-super-cache.pot 15 years ago
uninstall.php
89 lines
1 <html>
2 <head>
3 <title>WP Super Cache Uninstall Script</title>
4 </head>
5 <body>
6 <?php
7 /** Include the bootstrap for setting up WordPress environment */
8 include( '../../../wp-load.php' );
9
10 if ( !is_user_logged_in() )
11 wp_die( 'You must be logged in to run this script.' );
12
13 if ( !current_user_can( 'install_plugins' ) )
14 wp_die( 'You do not have permission to run this script.' );
15
16 if ( defined( 'UNINSTALL_WPSUPERCACHE' ) )
17 wp_die( 'UNINSTALL_WPSUPERCACHE set somewhere else! It must only be set in uninstall.php' );
18
19 define( 'UNINSTALL_WPSUPERCACHE', '' );
20
21 if ( !defined( 'UNINSTALL_WPSUPERCACHE' ) || constant( 'UNINSTALL_WPSUPERCACHE' ) == '' )
22 wp_die( 'UNINSTALL_WPSUPERCACHE must be set to a non-blank value in uninstall.php' );
23
24 ?>
25 <p>This script will uninstall the files and directories created by <a href='http://ocaoimh.ie/wp-super-cache/'>WP Super Cache</a>.</p>
26 <?php
27 if ( $_POST[ 'uninstall' ] ) {
28 $plugins = (array)get_option( 'active_plugins' );
29 $key = array_search( 'wp-super-cache/wp-cache.php', $plugins );
30 if ( $key !== false ) {
31 unset( $plugins[ $key ] );
32 update_option( 'active_plugins', $plugins );
33 echo "Disabled WP Super Cache plugin : <strong>DONE</strong><br />";
34 }
35
36 if ( in_array( 'wp-super-cache/wp-cache.php', get_option( 'active_plugins' ) ) )
37 wp_die( 'WP Super Cache is still active. Please disable it on your plugins page first.' );
38 echo "Removing " . WP_CONTENT_DIR . "/cache/ :";
39 uninstall_supercache( WP_CONTENT_DIR . '/cache' );
40 echo " <strong>DONE</strong><br />";
41 echo "Removing " . WP_CONTENT_DIR . "/advanced-cache.php :";
42 @unlink( WP_CONTENT_DIR . "/advanced-cache.php" );
43 echo " <strong>DONE</strong><br />";
44 echo "Removing " . WP_CONTENT_DIR . "/wp-cache-config.php :";
45 @unlink( WP_CONTENT_DIR . "/wp-cache-config.php" );
46 echo " <strong>DONE</strong><br />";
47 echo "<p>Make sure you remove the following line from " . ABSPATH . "wp-config.php too.</p>";
48 echo "<blockquote><code>define('WP_CACHE', true);</code></blockquote>";
49 echo "<p><strong>Please comment out the UNINSTALL_WPSUPERCACHE <em>define()</em> in this file!</strong></p>";
50 wp_mail( $current_user->user_email, 'WP Super Cache Uninstalled', '' );
51 } else {
52 ?>
53 <form action='uninstall.php' method='POST'>
54 <p>Click UNINSTALL to delete the following files and directories:
55 <ol>
56 <li> <?php echo WP_CONTENT_DIR . "/advanced-cache.php"; ?></li>
57 <li> <?php echo WP_CONTENT_DIR . "/wp-cache-config.php"; ?></li>
58 <li> <?php echo WP_CONTENT_DIR . '/cache'; ?></li>
59 </ol>
60 <input type='hidden' name='uninstall' value='1' />
61 <input type='submit' value='UNINSTALL' />
62 </form>
63 <?php
64 }
65
66 function uninstall_supercache( $folderPath ) { // from http://www.php.net/manual/en/function.rmdir.php
67 if ( trailingslashit( constant( 'ABSPATH' ) ) == trailingslashit( $folderPath ) )
68 return false;
69 if ( @is_dir ( $folderPath ) ) {
70 $dh = @opendir($folderPath);
71 while( false !== ( $value = @readdir( $dh ) ) ) {
72 if ( $value != "." && $value != ".." ) {
73 $value = $folderPath . "/" . $value;
74 if ( @is_dir ( $value ) ) {
75 uninstall_supercache( $value );
76 } else {
77 @unlink( $value );
78 }
79 }
80 }
81 return @rmdir( $folderPath );
82 } else {
83 return false;
84 }
85 }
86 ?>
87 </body>
88 </html>
89