PluginProbe ʕ •ᴥ•ʔ
WP Super Cache / 0.9.9.7
WP Super Cache v0.9.9.7
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 15 years ago plugins 15 years ago Changelog.txt 15 years ago advanced-cache.php 17 years ago ossdl-cdn.php 15 years ago readme.txt 15 years ago uninstall.php 15 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
98 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 if ( false == file_exists( './wp-load.php' ) ) {
9 die( 'This file must be copied into the same directory where WordPress is installed. The file wp-load.php is in this directory' );
10 }
11 include( './wp-load.php' );
12
13 if ( !is_user_logged_in() )
14 wp_die( 'You must be logged in to run this script.' );
15
16 if ( !current_user_can( 'install_plugins' ) )
17 wp_die( 'You do not have permission to run this script.' );
18
19 ?>
20 <p>This script will uninstall the files and directories created by <a href='http://ocaoimh.ie/wp-super-cache/'>WP Super Cache</a>.</p>
21 <?php
22 function uninstall_supercache( $folderPath ) { // from http://www.php.net/manual/en/function.rmdir.php
23 if ( trailingslashit( constant( 'ABSPATH' ) ) == trailingslashit( $folderPath ) )
24 return false;
25 if ( @is_dir ( $folderPath ) ) {
26 $dh = @opendir($folderPath);
27 while( false !== ( $value = @readdir( $dh ) ) ) {
28 if ( $value != "." && $value != ".." ) {
29 $value = $folderPath . "/" . $value;
30 if ( @is_dir ( $value ) ) {
31 uninstall_supercache( $value );
32 } else {
33 @unlink( $value );
34 }
35 }
36 }
37 return @rmdir( $folderPath );
38 } else {
39 return false;
40 }
41 }
42
43 if ( $_POST[ 'uninstall' ] ) {
44 $valid_nonce = isset($_REQUEST['_wpnonce']) ? wp_verify_nonce( $_REQUEST['_wpnonce'], 'wp-cache' . $current_user->ID ) : false;
45 $plugins = (array)get_option( 'active_plugins' );
46 $key = array_search( 'wp-super-cache/wp-cache.php', $plugins );
47 if ( $key !== false ) {
48 unset( $plugins[ $key ] );
49 update_option( 'active_plugins', $plugins );
50 echo "Disabled WP Super Cache plugin : <strong>DONE</strong><br />";
51 }
52
53 if ( in_array( 'wp-super-cache/wp-cache.php', get_option( 'active_plugins' ) ) )
54 wp_die( 'WP Super Cache is still active. Please disable it on your plugins page first.' );
55 echo "Removing " . WP_CONTENT_DIR . "/cache/ :";
56 uninstall_supercache( WP_CONTENT_DIR . '/cache' );
57 echo " <strong>DONE</strong><br />";
58 $permission_problem = false;
59 echo "Removing " . WP_CONTENT_DIR . "/advanced-cache.php :";
60 if ( false == @unlink( WP_CONTENT_DIR . "/advanced-cache.php" ) ) {
61 $permission_problem = true;
62 echo " <strong>FAILED</strong><br />";
63 } else {
64 echo " <strong>DONE</strong><br />";
65 }
66 echo "Removing " . WP_CONTENT_DIR . "/wp-cache-config.php :";
67 if ( false == unlink( WP_CONTENT_DIR . "/wp-cache-config.php" ) ) {
68 $permission_problem = true;
69 echo " <strong>FAILED</strong><br />";
70 } else {
71 echo " <strong>DONE</strong><br />";
72 }
73 if ( $permission_problem ) {
74 wp_die( "One or more files could not be deleted. " . WP_CONTENT_DIR . " must be made writeable:<br /><code>chmod 777 " . WP_CONTENT_DIR . "</code><br /><br /> and don't forgot to fix things later:<br /><code>chmod 755 " . WP_CONTENT_DIR . "</code><br /><br />" );
75 }
76 echo "<p>Make sure you remove the following line from " . ABSPATH . "wp-config.php too.</p>";
77 echo "<blockquote><code>define('WP_CACHE', true);</code></blockquote>";
78 wp_mail( $current_user->user_email, 'WP Super Cache Uninstalled', '' );
79 } else {
80 ?>
81 <form action='uninstall.php' method='POST'>
82 <p>Click UNINSTALL to delete the following files and directories:
83 <ol>
84 <li> <?php echo WP_CONTENT_DIR . "/advanced-cache.php"; ?></li>
85 <li> <?php echo WP_CONTENT_DIR . "/wp-cache-config.php"; ?></li>
86 <li> <?php echo WP_CONTENT_DIR . '/cache'; ?></li>
87 </ol>
88 <?php wp_nonce_field( 'wp-cache' . $current_user->ID ); ?>
89 <input type='hidden' name='uninstall' value='1' />
90 <input type='submit' value='UNINSTALL' />
91 </form>
92 <?php
93 }
94
95 ?>
96 </body>
97 </html>
98