diff --git a/wp-redis.php b/wp-redis.php index 77d57d6..0df1dca 100644 --- a/wp-redis.php +++ b/wp-redis.php @@ -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 ); }