Version Description
Emergency fix for sites running outdated WordPress and PHP.
=
Download this release
Release Info
Developer | donncha |
Plugin | WP Super Cache |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.5.1
- readme.txt +8 -3
- rest/class.wp-super-cache-rest-get-settings.php +1 -1
- rest/class.wp-super-cache-rest-update-settings.php +1 -1
- rest/load.php +12 -10
- wp-cache-phase2.php +2 -2
- wp-cache.php +4 -2
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: donncha, automattic, kraftbj
|
3 |
Tags: performance,caching,wp-cache,wp-super-cache,cache
|
4 |
Tested up to: 4.8
|
5 |
-
Stable tag: 1.5.
|
6 |
Requires at least: 3.0
|
7 |
|
8 |
A very fast caching engine for WordPress that produces static html files.
|
@@ -54,11 +54,16 @@ The cache directory, usually wp-content/cache/ is only for temporary files. Do n
|
|
54 |
|
55 |
== Upgrade Notice ==
|
56 |
|
57 |
-
= 1.5.
|
58 |
-
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
= 1.5.0 =
|
63 |
* REST API settings endpoints.
|
64 |
* Simplified settings page.
|
2 |
Contributors: donncha, automattic, kraftbj
|
3 |
Tags: performance,caching,wp-cache,wp-super-cache,cache
|
4 |
Tested up to: 4.8
|
5 |
+
Stable tag: 1.5.1
|
6 |
Requires at least: 3.0
|
7 |
|
8 |
A very fast caching engine for WordPress that produces static html files.
|
54 |
|
55 |
== Upgrade Notice ==
|
56 |
|
57 |
+
= 1.5.1 =
|
58 |
+
Emergency fix for sites running outdated WordPress and PHP.
|
59 |
|
60 |
== Changelog ==
|
61 |
|
62 |
+
= 1.5.1 =
|
63 |
+
* Don't use anonymous functions in REST API
|
64 |
+
* Check that REST API Controller is available before loading the REST API.
|
65 |
+
* Don't use multibyte string functions because some sites don't have it enabled.
|
66 |
+
|
67 |
= 1.5.0 =
|
68 |
* REST API settings endpoints.
|
69 |
* Simplified settings page.
|
rest/class.wp-super-cache-rest-get-settings.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once
|
4 |
|
5 |
class WP_Super_Cache_Rest_Get_Settings extends WP_REST_Controller {
|
6 |
|
1 |
<?php
|
2 |
|
3 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-settings-map.php';
|
4 |
|
5 |
class WP_Super_Cache_Rest_Get_Settings extends WP_REST_Controller {
|
6 |
|
rest/class.wp-super-cache-rest-update-settings.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once
|
4 |
|
5 |
class WP_Super_Cache_Rest_Update_Settings extends WP_REST_Controller {
|
6 |
|
1 |
<?php
|
2 |
|
3 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-settings-map.php';
|
4 |
|
5 |
class WP_Super_Cache_Rest_Update_Settings extends WP_REST_Controller {
|
6 |
|
rest/load.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once
|
4 |
-
require_once
|
5 |
-
require_once
|
6 |
-
require_once
|
7 |
-
require_once
|
8 |
-
require_once
|
9 |
-
require_once
|
10 |
-
require_once
|
11 |
|
12 |
class WP_Super_Cache_Router {
|
13 |
|
@@ -141,7 +141,9 @@ class WP_Super_Cache_Router {
|
|
141 |
|
142 |
}
|
143 |
|
144 |
-
|
145 |
$wpsupercache_route = new WP_Super_Cache_Router;
|
146 |
$wpsupercache_route->register_routes();
|
147 |
-
}
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-get-settings.php';
|
4 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-update-settings.php';
|
5 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-get-stats.php';
|
6 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-get-cache.php';
|
7 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-get-status.php';
|
8 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-test-cache.php';
|
9 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-delete-cache.php';
|
10 |
+
require_once WPCACHEHOME . 'rest/class.wp-super-cache-rest-preload.php';
|
11 |
|
12 |
class WP_Super_Cache_Router {
|
13 |
|
141 |
|
142 |
}
|
143 |
|
144 |
+
function wpsc_load_rest_api() {
|
145 |
$wpsupercache_route = new WP_Super_Cache_Router;
|
146 |
$wpsupercache_route->register_routes();
|
147 |
+
};
|
148 |
+
|
149 |
+
add_action( 'rest_api_init', 'wpsc_load_rest_api' );
|
wp-cache-phase2.php
CHANGED
@@ -233,7 +233,7 @@ function wp_cache_get_response_headers() {
|
|
233 |
$known_headers = apply_filters( 'wpsc_known_headers', $known_headers );
|
234 |
|
235 |
if ( ! isset( $known_headers[ 'age' ] ) ) {
|
236 |
-
$known_headers = array_map( '
|
237 |
}
|
238 |
|
239 |
$headers = array();
|
@@ -252,7 +252,7 @@ function wp_cache_get_response_headers() {
|
|
252 |
}
|
253 |
|
254 |
foreach( $headers as $key => $value ) {
|
255 |
-
if ( ! in_array(
|
256 |
unset( $headers[ $key ] );
|
257 |
}
|
258 |
}
|
233 |
$known_headers = apply_filters( 'wpsc_known_headers', $known_headers );
|
234 |
|
235 |
if ( ! isset( $known_headers[ 'age' ] ) ) {
|
236 |
+
$known_headers = array_map( 'strtolower', $known_headers );
|
237 |
}
|
238 |
|
239 |
$headers = array();
|
252 |
}
|
253 |
|
254 |
foreach( $headers as $key => $value ) {
|
255 |
+
if ( ! in_array( strtolower( $key ), $known_headers ) ) {
|
256 |
unset( $headers[ $key ] );
|
257 |
}
|
258 |
}
|
wp-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Super Cache
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-super-cache/
|
5 |
Description: Very fast caching plugin for WordPress.
|
6 |
-
Version: 1.5.
|
7 |
Author: Automattic
|
8 |
Author URI: https://automattic.com/
|
9 |
License: GPL2+
|
@@ -63,7 +63,9 @@ if( !defined( 'WP_CACHE' ) || ( defined( 'WP_CACHE' ) && constant( 'WP_CACHE' )
|
|
63 |
}
|
64 |
|
65 |
include(WPCACHEHOME . 'wp-cache-base.php');
|
66 |
-
|
|
|
|
|
67 |
|
68 |
function wp_super_cache_text_domain() {
|
69 |
load_plugin_textdomain( 'wp-super-cache', false, basename( dirname( __FILE__ ) ) . '/languages' );
|
3 |
Plugin Name: WP Super Cache
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-super-cache/
|
5 |
Description: Very fast caching plugin for WordPress.
|
6 |
+
Version: 1.5.1
|
7 |
Author: Automattic
|
8 |
Author URI: https://automattic.com/
|
9 |
License: GPL2+
|
63 |
}
|
64 |
|
65 |
include(WPCACHEHOME . 'wp-cache-base.php');
|
66 |
+
if ( class_exists( 'WP_REST_Controller' ) ) {
|
67 |
+
include( WPCACHEHOME . 'rest/load.php' );
|
68 |
+
}
|
69 |
|
70 |
function wp_super_cache_text_domain() {
|
71 |
load_plugin_textdomain( 'wp-super-cache', false, basename( dirname( __FILE__ ) ) . '/languages' );
|