diff --git a/README.md b/README.md index c521319..e74ce84 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **Tags:** cache, plugin, redis **Requires at least:** 3.0.1 **Tested up to:** 6.1.1 -**Stable tag:** 1.3.3 +**Stable tag:** 1.3.4 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -104,6 +104,9 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a ## Changelog ## +### 1.3.4 (March 7, 2023) ### +* Set `missing_redis_message` if Redis service is not connected [[#391](https://github.com/pantheon-systems/wp-redis/pull/391)]. + ### 1.3.3 (February 28, 2023) ### * Add PHP 8.2 support [[#388](https://github.com/pantheon-systems/wp-redis/pull/388)]. * Remove Grunt, add valid license to Composer file [[#387](https://github.com/pantheon-systems/wp-redis/pull/387)]. diff --git a/readme.txt b/readme.txt index b8b1faa..8506893 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: getpantheon, danielbachhuber, mboynes, Outlandish Josh Tags: cache, plugin, redis Requires at least: 3.0.1 Tested up to: 6.1.1 -Stable tag: 1.3.3 +Stable tag: 1.3.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -102,6 +102,9 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a == Changelog == += 1.3.4 (March 7, 2023) = +* Set `missing_redis_message` if Redis service is not connected [[#391](https://github.com/pantheon-systems/wp-redis/pull/391)]. + = 1.3.3 (February 28, 2023) = * Add PHP 8.2 support [[#388](https://github.com/pantheon-systems/wp-redis/pull/388)]. * Remove Grunt, add valid license to Composer file [[#387](https://github.com/pantheon-systems/wp-redis/pull/387)]. diff --git a/wp-redis.php b/wp-redis.php index 2e17c39..ab077ba 100644 --- a/wp-redis.php +++ b/wp-redis.php @@ -3,7 +3,7 @@ * Plugin Name: WP Redis * Plugin URI: http://github.com/pantheon-systems/wp-redis/ * Description: WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis). - * Version: 1.3.3 + * Version: 1.3.4 * Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber, Alley Interactive * Author URI: https://pantheon.io/ */ @@ -53,10 +53,14 @@ function wp_redis_get_info() { } if ( ! defined( 'WP_REDIS_OBJECT_CACHE' ) || ! WP_REDIS_OBJECT_CACHE ) { - return new WP_Error( 'wp-redis', 'WP Redis object-cache.php file is missing from the wp-content/ directory.' ); + return new WP_Error( 'wp-redis', __( 'WP Redis object-cache.php file is missing from the wp-content/ directory.', 'wp-redis' ) ); } if ( ! $wp_object_cache->is_redis_connected ) { + if ( ! isset( $wp_object_cache->missing_redis_message ) ) { + $wp_object_cache->missing_redis_message = __( 'A Redis service needs to be enabled before the WP Redis object cache will function properly.', 'wp-redis' ); + } + return new WP_Error( 'wp-redis', $wp_object_cache->missing_redis_message ); }