optimizations v1.7
optimizations

file:a/init.php -> file:b/init.php
--- a/init.php
+++ b/init.php
@@ -3,7 +3,7 @@
 Plugin Name: Redis Post Views
 Plugin URI: http://wordpress.org/extend/plugins/post-views-redis/
 Description: Highly optimized post views using Redis
-Version: 1.6
+Version: 1.7
 Author: Razvan Stanga
 Author URI: http://git.razvi.ro/
 License: http://www.apache.org/licenses/LICENSE-2.0
@@ -12,10 +12,13 @@
 
 Copyright 2017: Razvan Stanga (email: redis-post-views@razvi.ro)
 */
-define('RPV_VERSION', 1.5);
+define('RPV_VERSION', 1.7);
 define('RPV_PATH', dirname( __FILE__ ));
 
-include(WP_CONTENT_DIR  . '/wp-config-rpv.php');
+$config_file = WP_CONTENT_DIR  . '/wp-config-rpv.php';
+if (file_exists($config_file)) {
+    include($config_file);
+}
 include(RPV_PATH . '/classes/redis_post_views.php');
 
 $redis_post_views = new Redis_Post_Views();

--- a/post-view.php
+++ b/post-view.php
@@ -3,7 +3,7 @@
 Plugin Name: Redis Post Views
 Plugin URI: http://wordpress.org/extend/plugins/post-views-redis/
 Description: Highly optimized post views using Redis
-Version: 1.6
+Version: 1.7
 Author: Razvan Stanga
 Author URI: http://git.razvi.ro/
 License: http://www.apache.org/licenses/LICENSE-2.0
@@ -12,9 +12,12 @@
 
 Copyright 2017: Razvan Stanga (email: redis-post-views@razvi.ro)
 */
-@include('../../wp-config-rpv.php');
+$config_file = '../../wp-config-rpv.php';
+if (file_exists($config_file)) {
+    include($config_file);
+}
 
-define('RPV_VERSION', 1.5);
+define('RPV_VERSION', 1.7);
 define('RPV_PATH', dirname( __FILE__ ));
 
 include(RPV_PATH . '/classes/redis_post_views.php');

file:a/readme.txt -> file:b/readme.txt
--- a/readme.txt
+++ b/readme.txt
@@ -5,7 +5,7 @@
 Requires at least: 4.5
 Tested up to: 4.9
 Requires PHP: 5.2.4
-Stable tag: 1.6
+Stable tag: 1.7
 License: GPLv2 or later
 
 Highly optimized post views using Redis
@@ -36,7 +36,10 @@
 
 == Changelog ==
 
-= 1.5 =
+= 1.7 =
+* optimizations
+
+= 1.6 =
 * moved wp-config-rpv.php wo wp-config for improved compatibility
 
 = 1.5 =

comments