diff --git a/CHANGELOG.md b/CHANGELOG.md index 548d96a2..0c5e76de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.12.2-alpha] - unreleased +## [1.13.0-alpha] - unreleased This is an alpha version! The changes listed here are not final. +### Added +- Super Cache: notify Boost of migration to that plugin + ### Changed - Super Cache: tell user that Cache module of Boost must be deactivated to use WPSC - Updated package dependencies. @@ -742,7 +745,7 @@ This is an alpha version! The changes listed here are not final. Misc fixes -[1.12.2-alpha]: https://github.com/Automattic/wp-super-cache/compare/v1.12.1...v1.12.2-alpha +[1.13.0-alpha]: https://github.com/Automattic/wp-super-cache/compare/v1.12.1...v1.13.0-alpha [1.12.1]: https://github.com/Automattic/wp-super-cache/compare/v1.12.0...v1.12.1 [1.12.0]: https://github.com/Automattic/wp-super-cache/compare/v1.11.0...v1.12.0 [1.11.0]: https://github.com/Automattic/wp-super-cache/compare/v1.10.0...v1.11.0 diff --git a/composer.json b/composer.json index 7a1e10ec..78c966f4 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,6 @@ "wp-svn-autopublish": true }, "config": { - "autoloader-suffix": "6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha" + "autoloader-suffix": "6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha" } } diff --git a/inc/boost.php b/inc/boost.php index 53c9ba08..533e4046 100644 --- a/inc/boost.php +++ b/inc/boost.php @@ -33,4 +33,16 @@ function wpsc_track_move_from_boost() { do_action( 'jb_cache_moved_to_wpsc' ); } -add_action( 'wpsc_created_advanced_cache', 'wpsc_track_move_from_boost' ); \ No newline at end of file +add_action( 'wpsc_created_advanced_cache', 'wpsc_track_move_from_boost' ); + +/** + * Notify Jetpack Boost that Boost Cache will be used instead of WP Super Cache. + * + * @param string $source The source of the migration: 'notice', 'banner', 'try_button'. + */ +function wpsc_notify_migration_to_boost( $source ) { + if ( ! in_array( $source, array( 'notice', 'banner', 'try_button' ), true ) ) { + return; + } + set_transient( 'jb_cache_moved_to_boost', $source, WEEK_IN_SECONDS ); +} \ No newline at end of file diff --git a/package.json b/package.json index c43f3fe5..5ecc8c43 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-super-cache", - "version": "1.12.2-alpha", + "version": "1.13.0-alpha", "description": "A very fast caching engine for WordPress that produces static html files.", "homepage": "https://jetpack.com", "bugs": { diff --git a/vendor/autoload.php b/vendor/autoload.php index 5f661b52..94ea692a 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha::getLoader(); +return ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index a973cec4..b2879d47 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha +class ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha { private static $loader; @@ -24,12 +24,12 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e6b69e86..918bf631 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha +class ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha { public static $classMap = array ( 'Automattic\\Jetpack\\Device_Detection' => __DIR__ . '/..' . '/automattic/jetpack-device-detection/src/class-device-detection.php', @@ -15,7 +15,7 @@ class ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_al public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_12_2_alpha::$classMap; + $loader->classMap = ComposerStaticInit6fe342bc02f0b440f7b3c8d8ade42286_super_cacheⓥ1_13_0_alpha::$classMap; }, null, ClassLoader::class); } diff --git a/wp-cache.php b/wp-cache.php index d45e5363..9f71130a 100644 --- a/wp-cache.php +++ b/wp-cache.php @@ -3,7 +3,7 @@ * Plugin Name: WP Super Cache * Plugin URI: https://wordpress.org/plugins/wp-super-cache/ * Description: Very fast caching plugin for WordPress. - * Version: 1.12.2-alpha + * Version: 1.13.0-alpha * Author: Automattic * Author URI: https://automattic.com/ * License: GPL2+