From 04815a8c995eee906a8d04502132f0a006cf417a Mon Sep 17 00:00:00 2001
From: Erick Hitter <ehitter@gmail.com>
Date: Thu, 27 Feb 2014 16:40:40 -0800
Subject: [PATCH] Update more instances of the old plugin name

---
 index-redis-page-cache.php            | 42 ++++++++++++++++++++-------
 redis-page-cache/redis-page-cache.php | 25 ++++++++--------
 2 files changed, 43 insertions(+), 24 deletions(-)

diff --git a/index-redis-page-cache.php b/index-redis-page-cache.php
index 8dbd09b..77664b5 100644
--- a/index-redis-page-cache.php
+++ b/index-redis-page-cache.php
@@ -1,7 +1,27 @@
 <?php
-/**
- * Redis Page Cache
- */
+/*
+Plugin Name: Redis Page Cache
+Plugin URI: http://eth.pw/rpc
+Version: 1.0
+Description: Manage settings for full-page caching powered by Redis.
+Author: Erick Hitter
+Author URI: https://ethitter.com/
+
+This software is based on WP Redis Cache by Benjamin Adams, copyright 2013.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License, version 2, as
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
 
 /**
  * GLOBAL CONFIGURATION
@@ -220,7 +240,7 @@ function redis_page_cache_connect_redis() {
 			$redis_page_cache_config['debug_messages'] .= "<!-- using predis as a backup -->\n";
 		}
 
-		include_once dirname( __FILE__ ) . '/wp-content/plugins/wp-redis-cache/predis5.2.php'; //we need this to use Redis inside of PHP
+		include_once dirname( __FILE__ ) . '/wp-content/plugins/redis-page-cache/predis5.2.php'; //we need this to use Redis inside of PHP
 		$redis = array(
 			'host' => $redis_page_cache_config['redis_server'],
 			'port' => $redis_page_cache_config['redis_port'],
@@ -319,7 +339,7 @@ try {
 					if ( isset( $redis_page_cache_config['unlimited'] ) ) {
 						$unlimited = $redis_page_cache_config['unlimited'];
 					} else {
-						$unlimited = (bool) get_option( 'wp-redis-cache-debug', false );
+						$unlimited = (bool) get_option( 'redis-page-cache-debug', false );
 						$redis_page_cache_config['unlimited'] = $unlimited;
 					}
 
@@ -330,7 +350,7 @@ try {
 						if ( isset( $redis_page_cache_config['cache_duration'] ) ) {
 							$cache_duration = $redis_page_cache_config['cache_duration'];
 						} else {
-							$cache_duration = (int) get_option( 'wp-redis-cache-seconds', 43200 );
+							$cache_duration = (int) get_option( 'redis-page-cache-seconds', 43200 );
 							$redis_page_cache_config['cache_duration'] = $cache_duration;
 						}
 
@@ -362,15 +382,15 @@ if ( $redis_page_cache_config['debug'] ) {
 	$time = redis_page_cache_time_elapsed( $start, $end );
 	$redis_page_cache_config['debug_messages'] .= "<!-- Redis Page Cache by Erick Hitter. Page generated in " . $time . " seconds. -->\n";
 	$redis_page_cache_config['debug_messages'] .= "<!-- Site was cached = " . $redis_page_cache_config['cached'] . " -->\n";
-	$redis_page_cache_config['debug_messages'] .= "<!-- wp-redis-cache-key = " . $redis_page_cache_config['redis_key'] . "-->\n";
+	$redis_page_cache_config['debug_messages'] .= "<!-- redis-page-cache-key = " . $redis_page_cache_config['redis_key'] . "-->\n";
 	if ( isset( $redis_page_cache_config['cache_duration'] ) ) {
-		$redis_page_cache_config['debug_messages'] .= "<!-- wp-redis-cache-seconds = " . $redis_page_cache_config['cache_duration'] . " -->\n";
+		$redis_page_cache_config['debug_messages'] .= "<!-- redis-page-cache-seconds = " . $redis_page_cache_config['cache_duration'] . " -->\n";
 	}
-	$redis_page_cache_config['debug_messages'] .= "<!-- wp-redis-cache-ip = " . $redis_page_cache_config['server_ip'] . "-->\n";
+	$redis_page_cache_config['debug_messages'] .= "<!-- redis-page-cache-ip = " . $redis_page_cache_config['server_ip'] . "-->\n";
 	if ( isset( $redis_page_cache_config['unlimited'] ) ) {
-		$redis_page_cache_config['debug_messages'] .= "<!-- wp-redis-cache-unlimited = " . $redis_page_cache_config['unlimited'] . "-->\n";
+		$redis_page_cache_config['debug_messages'] .= "<!-- redis-page-cache-unlimited = " . $redis_page_cache_config['unlimited'] . "-->\n";
 	}
-	$redis_page_cache_config['debug_messages'] .= "<!-- wp-redis-cache-debug = " . $redis_page_cache_config['debug'] . "-->\n";
+	$redis_page_cache_config['debug_messages'] .= "<!-- redis-page-cache-debug = " . $redis_page_cache_config['debug'] . "-->\n";
 
 	echo $redis_page_cache_config['debug_messages'];
 }
diff --git a/redis-page-cache/redis-page-cache.php b/redis-page-cache/redis-page-cache.php
index 3ff8de5..e10948b 100644
--- a/redis-page-cache/redis-page-cache.php
+++ b/redis-page-cache/redis-page-cache.php
@@ -1,7 +1,7 @@
 <?php
 /*
 Plugin Name: Redis Page Cache
-Plugin URI: https://github.com/ethitter/wp-redis-cache
+Plugin URI: http://eth.pw/rpc
 Version: 1.0
 Description: Manage settings for full-page caching powered by Redis.
 Author: Erick Hitter
@@ -21,7 +21,6 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
 */
 
 class Redis_Page_Cache {
@@ -29,7 +28,7 @@ class Redis_Page_Cache {
 	private static $__instance = null;
 
 	// Regular class variables
-	private $ns = 'wp-redis-cache';
+	private $ns = 'redis-page-cache';
 
 	/**
 	 * Singleton instantiation
@@ -59,8 +58,8 @@ class Redis_Page_Cache {
 	 * @return null
 	 */
 	public function register_options() {
-		register_setting( $this->ns, 'wp-redis-cache-seconds', 'absint' );
-		register_setting( $this->ns, 'wp-redis-cache-unlimited', 'absint' );
+		register_setting( $this->ns, 'redis-page-cache-seconds', 'absint' );
+		register_setting( $this->ns, 'redis-page-cache-unlimited', 'absint' );
 	}
 
 	/**
@@ -90,25 +89,25 @@ class Redis_Page_Cache {
 		<form method="post" action="options.php">
 			<?php settings_fields( $this->ns ); ?>
 
-			<p><?php printf( __( 'This plugin does not work out of the box and requires additional steps.<br />Please follow these install instructions: %s.', 'wp-redis-cache' ), '<a target="_blank" href="https://github.com/BenjaminAdams/wp-redis-cache">https://github.com/BenjaminAdams/wp-redis-cache</a>' ); ?></p>
+			<p><?php printf( __( 'This plugin does not work out of the box and requires additional steps.<br />Please follow these install instructions: %s.', 'redis-page-cache' ), '<a target="_blank" href="https://github.com/BenjaminAdams/redis-page-cache">https://github.com/BenjaminAdams/redis-page-cache</a>' ); ?></p>
 
-			<p><?php _e( 'If you do not have Redis installed on your machine this will NOT work!', 'wp-redis-cache' ); ?></p>
+			<p><?php _e( 'If you do not have Redis installed on your machine this will NOT work!', 'redis-page-cache' ); ?></p>
 
 			<table class="form-table">
 				<tr>
-					<th scope="row"><label for="duration-seconds"><?php _e( 'Duration of Caching in Seconds:', 'wp-redis-cache' ); ?></label></td>
+					<th scope="row"><label for="duration-seconds"><?php _e( 'Duration of Caching in Seconds:', 'redis-page-cache' ); ?></label></td>
 					<td>
-						<input type="text" name="wp-redis-cache-seconds" id="duration-seconds" size="15" value="<?php echo (int) get_option( 'wp-redis-cache-seconds', 43200 ); ?>" />
+						<input type="text" name="redis-page-cache-seconds" id="duration-seconds" size="15" value="<?php echo (int) get_option( 'redis-page-cache-seconds', 43200 ); ?>" />
 
-						<p class="description"><?php _e( 'How many seconds would you like to cache individual pages? <strong>Recommended 12 hours or 43200 seconds</strong>.', 'wp-redis-cache' ); ?></p>
+						<p class="description"><?php _e( 'How many seconds would you like to cache individual pages? <strong>Recommended 12 hours or 43200 seconds</strong>.', 'redis-page-cache' ); ?></p>
 					</td>
 				</tr>
 				<tr>
-					<th scope="row"><label for="unlimited-cache"><?php _e( 'Cache Without Expiration?', 'wp-redis-cache' ); ?></label></th>
+					<th scope="row"><label for="unlimited-cache"><?php _e( 'Cache Without Expiration?', 'redis-page-cache' ); ?></label></th>
 					<td>
-						<input type="checkbox" name="wp-redis-cache-unlimited" id="unlimited-cache" value="1" <?php checked( true, (bool) get_option( 'wp-redis-cache-unlimited', false ) ); ?>/>
+						<input type="checkbox" name="redis-page-cache-unlimited" id="unlimited-cache" value="1" <?php checked( true, (bool) get_option( 'redis-page-cache-unlimited', false ) ); ?>/>
 
-						<p class="description"><?php _e( 'If this option is set, the cache never expire. This option overides the setting <em>Duration of Caching in Seconds</em>.', 'wp-redis-cache' ); ?></p>
+						<p class="description"><?php _e( 'If this option is set, the cache never expire. This option overides the setting <em>Duration of Caching in Seconds</em>.', 'redis-page-cache' ); ?></p>
 					</td>
 				</tr>
 			</table>
-- 
GitLab