Skip to content
Snippets Groups Projects
Commit 6f418eaa authored by lucha's avatar lucha
Browse files

cleanup of old wp-super-cache files

parent ee8e325a
No related branches found
No related tags found
No related merge requests found
2017-02-03 17:17 donncha
* readme.txt, wp-cache.php: Bump version number to 1.4.9 and update
changelog
2017-02-03 17:11 donncha
* wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: * Github
merge:
* Make sure $cache_path has a trailing slash
(https://github.com/Automattic/wp-super-cache/pull/77)
* Remove flush()
(https://github.com/Automattic/wp-super-cache/pull/127) but also
check if headers are empty and flush and get headers again.
(https://github.com/Automattic/wp-super-cache/pull/179)
* Add fix for customizer
(https://github.com/Automattic/wp-super-cache/pull/161) and don't
cache PUT AND DELETE requests
(https://github.com/Automattic/wp-super-cache/pull/178)
* Check for superglobals before using them.
(https://github.com/Automattic/wp-super-cache/pull/131)
2017-02-03 16:54 donncha
* plugins/multisite.php, wp-cache-base.php, wp-cache.php: Github
merge: Need to check more than WP_ALLOW_MULTISITE to detect
multisite installs.
https://github.com/Automattic/wp-super-cache/issues/97
2017-02-03 15:07 donncha
* wp-cache-phase1.php: Github merge:
https://github.com/Automattic/wp-super-cache/pull/161 and also
don't cache PUT and DELETE requests (caught earlier than before)
2017-02-03 14:45 donncha
* plugins/jetpack.php: Remove extra ">", props @dd32
https://github.com/Automattic/wp-super-cache/pull/168
2017-02-03 14:37 donncha
* wp-super-cache.pot: Updated translation file
2017-02-03 14:33 donncha
* wp-cache.php: github merge: some of the changes that were
supposed to be checked in the previous merge didn't make it.
2017-02-03 10:18 donncha
* readme.txt: * Bump the tested version.
* Update the changelog
2017-02-03 10:13 donncha
* Changelog.txt: Updated changelog
2017-02-02 18:14 donncha
* readme.txt: Updated readme.txt changelog and docs
2017-02-02 18:08 donncha
* ossdl-cdn.php, readme.txt, wp-cache-phase2.php, wp-cache.php:
Sync with GITHUB:
* Don't delete so many files on blogs with static homepages.
https://github.com/Automattic/wp-super-cache/pull/175
* Discourage use of file locking because semaphores cause
problems and it's not needed.
https://github.com/Automattic/wp-super-cache/pull/174
* Reorganise the settings page in small ways
https://github.com/Automattic/wp-super-cache/pull/173
* Fixed XSS in settings page. Props @jaypatel
https://github.com/Automattic/wp-super-cache/pull/172
2017-01-11 16:58 kraftbj
* readme.txt, wp-cache-phase2.php: Github #138: Do not cache
PUT/DELETE requests
2016-12-09 15:38 kraftbj
* wp-cache-phase2.php: Check that header parts exist to avoid
`Undefined Index` notices
2016-12-09 15:37 kraftbj
* wp-cache-phase2.php: Update to Git master
2016-12-09 10:25 donncha
* readme.txt: Bump the "tested up to" value
2016-08-01 20:39 kraftbj
* readme.txt: Bump tested version to 4.6
2016-05-09 14:56 kraftbj
* readme.txt: Bump tested version
2016-03-07 15:24 kraftbj
* readme.txt: Update readme for previous commit
2016-03-07 15:20 kraftbj
* wp-cache-phase2.php: Catch up SVN to GH
2016-03-07 13:46 donncha
* readme.txt, wp-cache.php: Bumped version to 1.4.8 and updated
changelog
2016-03-07 13:39 donncha
* wp-super-cache.pot: Updated translation pot file
2016-03-07 12:37 donncha
* wp-cache.php: Remove this link as Google is reporting it as
malware. It's still available at
https://web.archive.org/web/20150914095007/http://bytes.com/topic/php/answers/3917-seconds-converted-hh-mm-ss.
Ref: https://github.com/Automattic/wp-super-cache/issues/106
2015-12-16 18:14 kraftbj
* readme.txt, wp-cache.php: Update readme for 1.4.7
2015-12-16 16:59 kraftbj
* wp-cache.php: Fix settings page layout breakage in 4.4.
2015-12-02 15:50 kraftbj
* ossdl-cdn.php, wp-cache.php: Corrects typos. See
https://github.com/Automattic/wp-super-cache/issues/81
props https://github.com/christophherr
2015-10-21 19:54 kraftbj
* wp-cache-phase1.php: Remove variable no longer defined after
previous update.
2015-10-09 18:06 donncha
* Changelog.txt, readme.txt, wp-cache.php: Bump version to 1.4.6
and update changelog
2015-10-08 17:14 donncha
* wp-cache.php: Don't check if .htaccess already created as the
index check already created it. Props Tigertech. Ref:
https://wordpress.org/support/topic/all-website-pages-downloading-gz-file-after-latest-update?replies=28#post-7494087
2015-09-25 11:20 donncha
* Changelog.txt: Updated changelog
2015-09-25 10:55 donncha
* readme.txt, wp-cache.php: Bump version to release 1.4.5 and add
changelog
2015-09-24 15:37 donncha
* wp-cache-base.php, wp-cache-phase1.php, wp-cache-phase2.php,
wp-cache.php: * Add index.html files and "-index" directives to
stop indexing of directories
* Sanitise input on settings page
* MD5 the cookie, use JSON to encode meta files, and rename them
to .php
2015-09-24 11:37 donncha
* readme.txt: Changed homepage link and ocaoimh.ie to z9.io
2015-09-24 11:33 donncha
* readme.txt: Minor update to the description of cache rebuild
feature.
2015-09-24 10:39 donncha
* wp-cache-phase2.php: Reduce "needs rebuild" time to 10 seconds,
so those pages refresh faster.
2015-08-28 16:28 donncha
* wp-cache-phase1.php: Because sometimes your editing in HTTPS
while your site is on HTTP. Thanks kraftbj
2015-08-25 21:42 kraftbj
* wp-cache-phase2.php: Swap post_permalink with get_permalink. Both
are exactly the same and old enough to not impact any users.
post_permalink slated for deprecation in 4.4.
2015-08-10 14:06 donncha
* wp-cache-phase2.php: Avoid PHP warnings, props @daneodekirk
2015-08-10 13:25 donncha
* wp-cache.php: Use $wpdb->blogid rather than get_current_blog_id
as the former returns 0 on single site installs. Props
@daneodekirk
2015-07-30 10:13 donncha
* Changelog.txt, readme.txt: Updated changelog
2015-07-29 13:08 donncha
* wp-cache-phase2.php: Remove this function call as it's not
defined. Ref:
https://github.com/Automattic/wp-super-cache/commit/4f3229009e5c6c8487dd883910ea076a8e3b7e26
2015-07-27 16:36 kraftbj
* wp-cache.php: Don't flush settings for expiry time and garbage
collection. See
https://github.com/Automattic/wp-super-cache/pull/49
2015-07-27 16:28 donncha
* wp-cache-base.php: Remove CacheMeta class as it's not used any
more and caused APC errors. Ref:
https://github.com/Automattic/wp-super-cache/pull/21
2015-07-24 15:21 kraftbj
* wp-cache.php: Check if listfile isset to prevent PHP warning.
2015-07-23 13:56 donncha
* wp-cache.php: Remember the settings on the advanced settings page
when submitting the easy settings form. Thanks Jeremy Herve for
the bug report!
2015-07-22 15:52 donncha
* Changelog.txt, readme.txt: Updated changelog
2015-07-22 11:25 donncha
* wp-cache-phase2.php: Fixed typo in debug log entry
2015-07-15 11:56 donncha
* wp-cache.php: * Added uninstall function as well as deactivate
function. The deactivate function does not delete the config file
but it does disable caching because scheduled jobs must be
enabled in the settings page when the config file is used on
activation again.
* Fixed a bug where deactivating the plugin without visiting the
settings page causes a fatal error so the plugin can't be
deactivated
2015-07-02 14:19 donncha
* wp-cache-phase2.php: Minor changes to debugging
2015-07-02 13:58 donncha
* wp-cache-phase2.php: * prune_super_cache: exit immediately if the
file to be deleted doesn't exist
* Add extra debugging
2015-07-02 12:10 donncha
* wp-cache-phase2.php: Remove https from the home url as well
2015-07-01 16:37 donncha
* wp-cache-phase2.php: As so many checks for "should we cache this
page?" were put to the end of page generation the rebuild system
was broken. This fixes it by deleting the rebuild files created
earlier if the current page isn't to be cached (and thus creating
new cache files)
2015-07-01 15:46 donncha
* wp-cache-phase1.php: Always make sure supercachedirs have
trailing slashes
2015-07-01 15:30 donncha
* wp-cache-phase1.php: Cache the output of
wp_cache_get_cookies_values() for repeat calls
2015-07-01 14:59 donncha
* wp-cache-phase1.php: Use the pid to help logging on busy servers
2015-07-01 14:51 donncha
* plugins/domain-mapping.php: Suercache urls end in slashes
2015-06-23 15:32 kraftbj
* wp-cache-phase1.php: Check for If-Modified-Since before using it
as it is not always defined.
2015-06-03 02:36 kraftbj
* advanced-cache.php: Do not display broken messages for XMLRPC,
REST, AJAX requests.
2015-05-15 14:12 kraftbj
* wp-cache-phase2.php, wp-cache.php: Fix improper site_url usage
* Update site_url to home_url in another e-mail subject
* Use admin_url instead of constructing URL from site_url
2015-05-15 14:08 kraftbj
* wp-cache.php: Use home_url in Preload Cron e-mails.
2015-05-15 11:13 donncha
* wp-cache-phase1.php, wp-cache-phase2.php: Revert 1149165 as it's
not needed any more.
2015-05-15 11:02 donncha
* readme.txt: Bump the tested to version number to 4.2.2
2015-05-13 21:01 kraftbj
* wp-cache.php: Improve the 1&1 hosting workaround to reduce false
positives.
2015-05-01 13:53 donncha
* wp-cache.php: Check if it's an array to avoid PHP warning
2015-05-01 13:51 donncha
* wp-cache-phase2.php: Added some extra debugging
2015-04-29 16:55 kraftbj
* readme.txt: Condense changelog to keep it nice and short :)
2015-04-29 15:58 kraftbj
* readme.txt: Update changelog to keep pace with trunk.
2015-04-29 15:45 donncha
* wp-cache-phase1.php, wp-cache-phase2.php: Check if mb_strlen()
exists before WordPress loads so it doesn't use the limited
mb_strlen compat function in WordPress 4.2. Ref:
https://wordpress.org/support/topic/421-initial-blank-page-load?replies=11
2015-04-28 15:53 kraftbj
* readme.txt: Add previous commits to readme.txt as a running
changelog to make it easier to compile for next release.
2015-04-28 15:24 kraftbj
* wp-cache.php: Preload Cron E-mail Updates
2015-04-28 15:17 kraftbj
* wp-cache.php: Preload only public post types. See
https://github.com/Automattic/wp-super-cache/pull/18
2015-04-21 18:22 kraftbj
* readme.txt: Tested to tag bump to 4.2
2015-04-07 16:00 donncha
* wp-cache-phase2.php: Don't disable supercache caching on CRON
requests. Fixes problems clearing front page cache on scheduled
posts
2015-04-04 22:57 donncha
* wp-cache-phase1.php: Fix the log_message, finally. Props
webaware.
2015-04-04 12:17 donncha
* Changelog.txt: Updated changelog
2015-04-04 12:13 donncha
* readme.txt: Updated changelog
2015-04-04 12:12 donncha
* wp-cache-phase1.php: Make sure we log the actual message in the
debug log.
2015-04-04 12:00 donncha
* Changelog.txt: Updated changelog
2015-04-04 11:55 donncha
* readme.txt, wp-cache.php: Bump version to 1.4.4 and update
changelog
2015-04-04 11:47 donncha
* wp-cache-phase1.php, wp-cache-phase2.php: Don't use print_r to
view GET variables as it causes a fatal PHP error in the output
buffer handler. Props webaware
https://wordpress.org/support/topic/print_r-debug-messages-break-pages-with-query-args?replies=2
2015-04-03 16:51 donncha
* Changelog.txt: Updated changelog
2015-04-03 16:44 donncha
* readme.txt, wp-cache.php: Bump version to 1.4.3, update
changelog, and add link to GIT repo.
2015-04-03 15:37 donncha
* wp-cache.php: Escape the contents of the cache list to avoid
surprises. Props Marc Montpas from Sucuri.
2014-12-18 10:55 jeherve
* readme.txt: Bump testing to 4.1
2014-10-10 14:07 kraftbj
* plugins/jetpack.php, wp-cache-phase1.php, wp-cache-phase2.php,
wp-cache.php: Removing variable checks since wp_cache_debug does
it already. Ref:
https://github.com/Automattic/wp-super-cache/pull/15
2014-10-10 14:06 kraftbj
* readme.txt: Catch up to SVN
2014-10-10 14:06 kraftbj
* readme.txt: Add Jetpack to mobile FAQ.
2014-09-04 14:16 kraftbj
* readme.txt: Bumped testing to 4.0
2014-08-11 19:06 donncha
* plugins/dynamic-cache-test.php: Because without a h we'd have
time keeping. Fixed a typo.
2014-08-11 18:44 donncha
* plugins/dynamic-cache-test.php: Added cronology of a request
2014-08-11 18:22 donncha
* plugins/dynamic-cache-test.php: Fixed the safety function in the
first example test function
2014-08-08 16:27 donncha
* Changelog.txt, readme.txt, wp-cache.php: Bump version to 1.4.2
and update changelog
2014-08-08 13:07 donncha
* wp-cache-phase1.php: Just in case the local modified time of a
file is 0, disable the "last modified time" check.
2014-08-08 11:32 donncha
* plugins/domain-mapping.php: Check if HTTPS exists before checking
it's value to avoid warnings
2014-08-08 11:24 donncha
* wp-cache.php: Replace wpdb->escape with esc_sql() as it's
deprecated.
2014-08-08 11:21 donncha
* wp-cache-phase2.php: Make sure $wp_cache_no_cache_for_get,
$wp_cache_object_cache, $wp_cache_request_uri are visible to the
OB callback to avoid warnings and fix functionality
2014-08-07 14:00 donncha
* Changelog.txt, readme.txt, wp-cache.php: Updated changelog,
documentation, bumped version number to 1.4.1 and tested version.
2014-08-07 12:45 donncha
* wp-cache.php: Removed author information
2014-08-06 12:41 kraftbj
* plugins/awaitingmoderation.php, plugins/badbehaviour.php,
plugins/domain-mapping.php, plugins/jetpack.php,
plugins/searchengine.php, plugins/wptouch.php, wp-cache.php: PR
#13: Added .button-primary and .button-secondary classes to and
removed &raquo's from buttons throughout the admin for
consistency. Ref:
https://github.com/Automattic/wp-super-cache/pull/13 Props:
rcowles
2014-08-05 20:00 kraftbj
* ossdl-cdn.php, readme.txt, wp-cache.php: Fix bad merge.
2014-08-05 19:56 kraftbj
* readme.txt: Add Jetpack to mobile FAQ.
2014-08-05 19:56 kraftbj
* wp-cache.php: Remove CDN Sync Tools. No longer in WP.org repo
2014-08-05 19:55 kraftbj
* ossdl-cdn.php, readme.txt, wp-cache.php: Update
wordpress.org/extend URLs
2014-08-05 12:42 donncha
* wp-cache.php: Fix to avoid an XSS in the settings page. Props
Simon Waters, Surevine Limited.
2014-08-04 22:04 kraftbj
* ossdl-cdn.php: Remove reference to CDN Sync. Plugin no longer in
repo.
2014-07-31 21:09 kraftbj
* readme.txt: Add Jetpack to mobile FAQ.
2014-07-31 21:09 kraftbj
* wp-cache.php: Remove CDN Sync Tools. No longer in WP.org repo
2014-07-31 21:08 kraftbj
* ossdl-cdn.php, readme.txt, wp-cache-phase1.php, wp-cache.php:
Update wordpress.org/extend URLs
2014-07-31 21:08 kraftbj
* plugins/awaitingmoderation.php, plugins/badbehaviour.php,
plugins/domain-mapping.php, plugins/dynamic-cache-test.php,
plugins/jetpack.php, plugins/searchengine.php,
plugins/wptouch.php: Trim whitespace
2014-07-31 21:07 kraftbj
* wp-cache-config-sample.php, wp-cache-phase1.php, wp-cache.php:
Trim whitespace
2014-07-31 21:06 kraftbj
* wp-cache.php: Admin: Add clear to h3 to pretify Recommended Links
title
2014-07-31 20:51 donncha
* wp-cache-phase2.php: Make sure these are global so the function
knows about them. Props JoHenton and richardmtl
http://wordpress.org/support/topic/notices-appearing-above-site-pages-how-do-i-get-rid-of-them?replies=2
2014-04-17 16:21 donncha
* readme.txt: Bump tested version to 3.9
2014-03-11 17:58 donncha
* wp-cache.php: Fix undefined variables warnings. Ref:
http://wordpress.org/support/topic/plugin-wp-super-cache-lot-of-undefined-variables-and-couple-of-warnings?replies=4
2014-03-07 18:00 donncha
* plugins/dynamic-cache-test.php: Better comments and rearrange
example scripts
2014-03-05 12:37 donncha
* wp-cache-phase1.php: HTTP_IF_MODIFIED_SINCE isn't always defined,
so check first.
http://wordpress.org/support/topic/undefined-index-http_if_modified_since?replies=1
2014-03-05 11:54 donncha
* wp-cache-phase1.php, wp-cache-phase2.php: Don't check "do not
cache" conditions until after page buffer has been filled. Ref:
http://wordpress.org/support/topic/bug-dynamic-cache-tags-are-not-replaced-because-of-wp_cache_phase2-conditions
2014-03-04 17:26 donncha
* wp-cache-phase2.php: Added the function wp_cache_maybe_dynamic()
to run buffer through the dynamic cache filter if callback
returned early. Ref:
http://wordpress.org/support/topic/bug-dynamic-cache-tags-are-not-replaced-because-of-wp_cache_phase2-conditions?replies=1
2014-03-04 16:27 donncha
* wp-cache-phase1.php: Hide any warnings from this opendir() as it
somehow fails occasionally.
2014-02-25 17:48 donncha
* wp-cache.php: Clear the cache for the current blog only, don't
want to mess with other multisite blogs
2014-02-25 16:24 donncha
* readme.txt: Bump tested version to current WP version
2013-11-29 15:34 donncha
* wp-cache-phase2.php: Check that $post is an object as this
function is used for more than just post changes.
http://wordpress.org/support/topic/error-switching-themes?replies=2
2013-11-12 09:55 donncha
* advanced-cache.php: Don't show the "advanced-cache.php warning"
when the plugin isn't loaded, props RobertHarm,
http://wordpress.org/support/topic/wp-super-cache-breaks-leaflet-maps-marker-plugin
2013-10-25 14:37 donncha
* wp-cache.php: Define $disable_supercache_htaccess_warning if not
set to avoid PHP warnings, ref:
http://wordpress.org/support/topic/just-a-few-notices-non-critical?replies=1,
props @mattV
2013-10-25 14:33 donncha
* wp-cache-base.php: Avoid a PHP warning if $base is not set. Ref:
http://wordpress.org/support/topic/just-a-few-notices-non-critical?replies=1
2013-10-25 09:29 donncha
* wp-cache.php: Only display the WPCACHEHOME warning if WP_CACHE is
defined and true. Warning won't show until settings page loaded
that WP_CACHE added to wp-config.php
2013-10-24 11:23 donncha
* wp-cache.php: Add trailing slashes to the admin bar path, to fix
the path when no trailing slash is used. Props @gonperesgmailcom
http://wordpress.org/support/topic/fixed-delete-individual-pages-from-cache?replies=2
2013-10-23 10:56 donncha
* readme.txt, wp-cache.php: Bump version to 1.4 and tested version
to 3.6.1
<?php
function wp_supercache_searchengine( $string ) {
global $passingthrough, $nevershowads, $cache_no_adverts_for_friends;
$cache_no_adverts_for_friends = wpsc_get_searchengine_setting();
if ( ! $cache_no_adverts_for_friends || '' != $string ) {
return $string;
}
if ( isset( $_COOKIE['7a1254cba80da02d5478d91cfd0a873a'] ) && '1' === $_COOKIE['7a1254cba80da02d5478d91cfd0a873a'] ) {
$string = 'searchengine';
} elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
if ( is_array( $passingthrough ) === false ) {
return $string;
}
foreach ( $passingthrough as $url ) {
if ( strpos( $_SERVER['HTTP_REFERER'], $url ) ) {
reset( $nevershowads );
$se = false;
foreach ( $nevershowads as $whitesite ) {
if ( false === strpos( $_SERVER['HTTP_REFERER'], $whitesite ) ) {
$se = true;
}
}
if ( $se ) {
$string = 'searchengine';
@setcookie( '7a1254cba80da02d5478d91cfd0a873a', 1, time() + 3600, '/' );
}
}
}
}
return $string;
}
add_cacheaction( 'wp_cache_get_cookies_values', 'wp_supercache_searchengine' );
function searchenginesupercache( $user_info ) {
if ( 'searchengine' === $user_info && is_single() && is_old_post() ) {
return true;
} else {
return false;
}
}
function wpsc_get_searchengine_setting() {
global $cache_no_adverts_for_friends;
if ( ! isset( $cache_no_adverts_for_friends ) ) {
return 0;
}
$changed = false;
if ( 'yes' === $cache_no_adverts_for_friends || '1' === $cache_no_adverts_for_friends ) {
$cache_no_adverts_for_friends = 1;
$changed = true;
} elseif ( 'no' === $cache_no_adverts_for_friends ) {
$cache_no_adverts_for_friends = 0;
$changed = true;
}
if ( $changed && function_exists( 'wp_cache_setting' ) ) {
wp_cache_setting( 'cache_no_adverts_for_friends', $cache_no_adverts_for_friends );
}
return $cache_no_adverts_for_friends;
}
function searchengine_phase2_actions() {
global $cache_no_adverts_for_friends;
$cache_no_adverts_for_friends = wpsc_get_searchengine_setting();
if ( $cache_no_adverts_for_friends ) {
add_filter( 'do_createsupercache', 'searchenginesupercache' );
}
}
add_cacheaction( 'add_cacheaction', 'searchengine_phase2_actions' );
function wp_supercache_searchengine_admin() {
global $cache_no_adverts_for_friends, $valid_nonce;
$cache_no_adverts_for_friends = wpsc_get_searchengine_setting();
if ( isset( $_POST['cache_no_adverts_for_friends'] ) && $valid_nonce ) {
if ( $cache_no_adverts_for_friends !== (int) $_POST['cache_no_adverts_for_friends'] ) {
$changed = 1;
} else {
$changed = 0;
}
$cache_no_adverts_for_friends = (int) $_POST['cache_no_adverts_for_friends'];
wp_cache_setting( 'cache_no_adverts_for_friends', $cache_no_adverts_for_friends );
}
?>
<fieldset id="no_adverts_for_friends-section" class="options">
<h4><?php _e( 'No Adverts for Friends', 'wp-super-cache' ); ?></h4>
<form name="wp_manager" action="" method="post">
<label><input type="radio" name="cache_no_adverts_for_friends" value="1" <?php if ( $cache_no_adverts_for_friends ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Enabled', 'wp-super-cache' ); ?></label>
<label><input type="radio" name="cache_no_adverts_for_friends" value="0" <?php if ( ! $cache_no_adverts_for_friends ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Disabled', 'wp-super-cache' ); ?></label>
<?php
echo '<p>' . __( 'Provides support for <a href="https://odd.blog/no-adverts-for-friends/">No Adverts for Friends</a>.', 'wp-super-cache' ) . '</p>';
if ( isset( $changed ) && $changed ) {
if ( $cache_no_adverts_for_friends ) {
$status = __( 'enabled', 'wp-super-cache' );
} else {
$status = __( 'disabled', 'wp-super-cache' );
}
echo '<p><strong>' . sprintf( __( 'No Adverts for Friends support is now %s', 'wp-super-cache' ), $status ) . '</strong></p>';
}
echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
wp_nonce_field( 'wp-cache' );
?>
</form>
</fieldset>
<?php
}
add_cacheaction( 'cache_admin_page', 'wp_supercache_searchengine_admin' );
function wpsc_cache_no_adverts_for_friends_list( $list ) {
$list['no_adverts_for_friends'] = array(
'key' => 'no_adverts_for_friends',
'url' => 'https://odd.blog/no-adverts-for-friends/',
'title' => __( 'No Adverts for Friends', 'wp-super-cache' ),
'desc' => __( 'Provides support for No Adverts for Friends plugin.', 'wp-super-cache' ),
);
return $list;
}
add_cacheaction( 'wpsc_filter_list', 'wpsc_cache_no_adverts_for_friends_list' );
# WP Super Cache #
* Contributors: donncha, automattic, kraftbj
* Tags: performance, caching, wp-cache, wp-super-cache, cache
* Tested up to: 4.9.8
* Tested up to: 5.0.2
* Stable tag: 1.6.4
* Requires at least: 3.1
* Requires PHP: 5.2.4
......
<html>
<head>
<title>WP Super Cache Uninstall Script</title>
</head>
<body>
<?php
/** Include the bootstrap for setting up WordPress environment */
if ( false == file_exists( './wp-load.php' ) ) {
die( 'This file must be copied into the same directory where WordPress is installed. The file wp-load.php is in this directory' );
}
include( './wp-load.php' );
if ( !is_user_logged_in() )
wp_die( 'You must be logged in to run this script.' );
if ( !current_user_can( 'install_plugins' ) )
wp_die( 'You do not have permission to run this script.' );
?>
<p>This script will uninstall the files and directories created by <a href='http://ocaoimh.ie/wp-super-cache/'>WP Super Cache</a>.</p>
<?php
function uninstall_supercache( $folderPath ) { // from http://www.php.net/manual/en/function.rmdir.php
if ( trailingslashit( constant( 'ABSPATH' ) ) == trailingslashit( $folderPath ) )
return false;
if ( @is_dir ( $folderPath ) ) {
$dh = @opendir($folderPath);
while( false !== ( $value = @readdir( $dh ) ) ) {
if ( $value != "." && $value != ".." ) {
$value = $folderPath . "/" . $value;
if ( @is_dir ( $value ) ) {
uninstall_supercache( $value );
} else {
@unlink( $value );
}
}
}
return @rmdir( $folderPath );
} else {
return false;
}
}
if ( $_POST[ 'uninstall' ] ) {
$valid_nonce = isset($_REQUEST['_wpnonce']) ? wp_verify_nonce( $_REQUEST['_wpnonce'], 'wp-cache' . $current_user->ID ) : false;
$plugins = (array)get_option( 'active_plugins' );
$key = array_search( 'wp-super-cache/wp-cache.php', $plugins );
if ( $key !== false ) {
unset( $plugins[ $key ] );
update_option( 'active_plugins', $plugins );
echo "Disabled WP Super Cache plugin : <strong>DONE</strong><br />";
}
if ( in_array( 'wp-super-cache/wp-cache.php', get_option( 'active_plugins' ) ) )
wp_die( 'WP Super Cache is still active. Please disable it on your plugins page first.' );
echo "Removing " . WP_CONTENT_DIR . "/cache/ :";
uninstall_supercache( WP_CONTENT_DIR . '/cache' );
echo " <strong>DONE</strong><br />";
$permission_problem = false;
echo "Removing " . WP_CONTENT_DIR . "/advanced-cache.php :";
if ( false == @unlink( WP_CONTENT_DIR . "/advanced-cache.php" ) ) {
$permission_problem = true;
echo " <strong>FAILED</strong><br />";
} else {
echo " <strong>DONE</strong><br />";
}
echo "Removing " . WP_CONTENT_DIR . "/wp-cache-config.php :";
if ( false == unlink( WP_CONTENT_DIR . "/wp-cache-config.php" ) ) {
$permission_problem = true;
echo " <strong>FAILED</strong><br />";
} else {
echo " <strong>DONE</strong><br />";
}
if ( $permission_problem ) {
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 />" );
}
echo "<p>Make sure you remove the following line from " . ABSPATH . "wp-config.php too.</p>";
echo "<blockquote><code>define('WP_CACHE', true);</code></blockquote>";
wp_mail( $current_user->user_email, 'WP Super Cache Uninstalled', '' );
} else {
?>
<form action='uninstall.php' method='POST'>
<p>Click UNINSTALL to delete the following files and directories:
<ol>
<li> <?php echo WP_CONTENT_DIR . "/advanced-cache.php"; ?></li>
<li> <?php echo WP_CONTENT_DIR . "/wp-cache-config.php"; ?></li>
<li> <?php echo WP_CONTENT_DIR . '/cache'; ?></li>
</ol>
<?php wp_nonce_field( 'wp-cache' . $current_user->ID ); ?>
<input type='hidden' name='uninstall' value='1' />
<input type='submit' value='UNINSTALL' />
</form>
<?php
}
?>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment