Version Description
- Compatibility with Hyper Cache
- Update JSON REST service disable, remove the json_enabled as being deprecated, rely on rest_authentication_errors filter
- Fix WooCommerce Update Database link when changing the default /wp-admin/ slug
- Fix password forget return URL
- Remove callback for Compatibility file for Shield Security within new-admin module
Download this release
Release Info
Developer | nsp-code |
Plugin | WP Hide & Security Enhancer |
Version | 1.6.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.6.1.1 to 1.6.1.3
- compatibility/hyper-cache.php +52 -0
- compatibility/woocommerce.php +29 -0
- include/class.compatibility.php +3 -0
- include/wph.class.php +1 -1
- modules/components/rewrite-json-rest.php +9 -1
- readme.txt +8 -1
- wp-hide.php +1 -1
compatibility/hyper-cache.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Compatibility for Plugin Name: Hyper Cache
|
5 |
+
* Compatibility checked on Version: 3.3.9
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
9 |
+
|
10 |
+
class WPH_conflict_handle_hyper_cache
|
11 |
+
{
|
12 |
+
|
13 |
+
var $wph;
|
14 |
+
|
15 |
+
function __construct()
|
16 |
+
{
|
17 |
+
if( ! $this->is_plugin_active())
|
18 |
+
return FALSE;
|
19 |
+
|
20 |
+
global $wph;
|
21 |
+
|
22 |
+
$this->wph = $wph;
|
23 |
+
|
24 |
+
add_filter( 'cache_buffer', array( $this , 'cache_buffer' ), 99 );
|
25 |
+
}
|
26 |
+
|
27 |
+
static function is_plugin_active()
|
28 |
+
{
|
29 |
+
|
30 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
31 |
+
|
32 |
+
if(is_plugin_active( 'hyper-cache/plugin.php' ))
|
33 |
+
return TRUE;
|
34 |
+
else
|
35 |
+
return FALSE;
|
36 |
+
}
|
37 |
+
|
38 |
+
function cache_buffer( $buffer )
|
39 |
+
{
|
40 |
+
|
41 |
+
$buffer = $this->wph->ob_start_callback( $buffer );
|
42 |
+
|
43 |
+
return $buffer;
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
|
49 |
+
new WPH_conflict_handle_hyper_cache();
|
50 |
+
|
51 |
+
|
52 |
+
?>
|
compatibility/woocommerce.php
CHANGED
@@ -11,6 +11,10 @@
|
|
11 |
//check for block
|
12 |
if( isset( $_GET['wph-throw-404'] ) )
|
13 |
add_filter ('woocommerce_is_rest_api_request', '__return_false' );
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
static function is_plugin_active()
|
@@ -74,6 +78,31 @@
|
|
74 |
|
75 |
return $data;
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
|
79 |
}
|
11 |
//check for block
|
12 |
if( isset( $_GET['wph-throw-404'] ) )
|
13 |
add_filter ('woocommerce_is_rest_api_request', '__return_false' );
|
14 |
+
|
15 |
+
|
16 |
+
add_filter('admin_url', array( 'WPH_conflict_handle_woocommerce', 'admin_url'), 20, 3);
|
17 |
+
|
18 |
}
|
19 |
|
20 |
static function is_plugin_active()
|
78 |
|
79 |
return $data;
|
80 |
}
|
81 |
+
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Fix wrong admin url
|
85 |
+
*
|
86 |
+
* @param mixed $url
|
87 |
+
* @param mixed $path
|
88 |
+
* @param mixed $blog_id
|
89 |
+
*/
|
90 |
+
static function admin_url( $url, $path, $blog_id )
|
91 |
+
{
|
92 |
+
|
93 |
+
global $wph;
|
94 |
+
|
95 |
+
$admin_url = $wph->functions->get_module_item_setting( 'admin_url' );
|
96 |
+
|
97 |
+
if ( empty ( $admin_url ) )
|
98 |
+
return $url;
|
99 |
+
|
100 |
+
if ( strpos ( $url, '/wp-admin/' . $admin_url .'/' ) !== FALSE )
|
101 |
+
$url = str_replace( '/' . $admin_url . '/', '/', $url);
|
102 |
+
|
103 |
+
return $url;
|
104 |
+
|
105 |
+
}
|
106 |
|
107 |
|
108 |
}
|
include/class.compatibility.php
CHANGED
@@ -127,6 +127,9 @@
|
|
127 |
//WP-Optimize - Clean, Compress, Cache
|
128 |
include_once(WPH_PATH . 'compatibility/wp-optimize.php');
|
129 |
|
|
|
|
|
|
|
130 |
/**
|
131 |
* Themes
|
132 |
*/
|
127 |
//WP-Optimize - Clean, Compress, Cache
|
128 |
include_once(WPH_PATH . 'compatibility/wp-optimize.php');
|
129 |
|
130 |
+
//Hyper Cache
|
131 |
+
include_once(WPH_PATH . 'compatibility/hyper-cache.php');
|
132 |
+
|
133 |
/**
|
134 |
* Themes
|
135 |
*/
|
include/wph.class.php
CHANGED
@@ -811,7 +811,7 @@
|
|
811 |
* Check if register link for to apply the replacement
|
812 |
* Unfortunate the default WordPress link does not contain a beginning backslash to make a replacement match in functions->content_urls_replacement
|
813 |
*/
|
814 |
-
if(preg_match("/(wp-login.php
|
815 |
{
|
816 |
$updated_slug = $this->functions->get_module_item_setting('new_wp_login_php' , 'admin');
|
817 |
if ( ! empty( $updated_slug ))
|
811 |
* Check if register link for to apply the replacement
|
812 |
* Unfortunate the default WordPress link does not contain a beginning backslash to make a replacement match in functions->content_urls_replacement
|
813 |
*/
|
814 |
+
if ( preg_match("/(wp-login.php?(.*)?checkemail=registered)/i", $location) || preg_match("/(wp-login.php?(.*)?checkemail=confirm)/i", $location ) )
|
815 |
{
|
816 |
$updated_slug = $this->functions->get_module_item_setting('new_wp_login_php' , 'admin');
|
817 |
if ( ! empty( $updated_slug ))
|
modules/components/rewrite-json-rest.php
CHANGED
@@ -211,11 +211,19 @@
|
|
211 |
if(empty($saved_field_data) || $saved_field_data == 'no')
|
212 |
return FALSE;
|
213 |
|
214 |
-
add_filter('
|
215 |
add_filter('rest_jsonp_enabled', '__return_false');
|
216 |
|
217 |
}
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
function _callback_saved_block_json_rest($saved_field_data)
|
221 |
{
|
211 |
if(empty($saved_field_data) || $saved_field_data == 'no')
|
212 |
return FALSE;
|
213 |
|
214 |
+
add_filter('rest_authentication_errors', array ( $this, 'rest_authentication_errors' ) );
|
215 |
add_filter('rest_jsonp_enabled', '__return_false');
|
216 |
|
217 |
}
|
218 |
|
219 |
+
|
220 |
+
function rest_authentication_errors( $result )
|
221 |
+
{
|
222 |
+
|
223 |
+
return new WP_Error( 'rest_disabled', 'The service is currently disabled.', array( 'status' => 400 ) );
|
224 |
+
|
225 |
+
}
|
226 |
+
|
227 |
|
228 |
function _callback_saved_block_json_rest($saved_field_data)
|
229 |
{
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.nsp-code.com/
|
|
4 |
Tags: wordpress hide, hide, security, improve security, hacking, wp hide, custom login, wp-loging.php, wp-admin, admin hide, login change,
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 5.5.1
|
7 |
-
Stable tag: 1.6.1.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Hide and increase Security for your WordPress site using smart techniques. No files are changed on your server. Change default admin and wp-login urls
|
@@ -345,6 +345,13 @@ Please get in touch with us and we'll do our best to include it for a next versi
|
|
345 |
|
346 |
== Changelog ==
|
347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
= 1.6.1.1 =
|
349 |
* Fix: Remove callback for Compatibility file for Shield Security within custom login module
|
350 |
|
4 |
Tags: wordpress hide, hide, security, improve security, hacking, wp hide, custom login, wp-loging.php, wp-admin, admin hide, login change,
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 5.5.1
|
7 |
+
Stable tag: 1.6.1.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Hide and increase Security for your WordPress site using smart techniques. No files are changed on your server. Change default admin and wp-login urls
|
345 |
|
346 |
== Changelog ==
|
347 |
|
348 |
+
= 1.6.1.3 =
|
349 |
+
* Compatibility with Hyper Cache
|
350 |
+
* Update JSON REST service disable, remove the json_enabled as being deprecated, rely on rest_authentication_errors filter
|
351 |
+
* Fix WooCommerce Update Database link when changing the default /wp-admin/ slug
|
352 |
+
* Fix password forget return URL
|
353 |
+
* Remove callback for Compatibility file for Shield Security within new-admin module
|
354 |
+
|
355 |
= 1.6.1.1 =
|
356 |
* Fix: Remove callback for Compatibility file for Shield Security within custom login module
|
357 |
|
wp-hide.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.wp-hide.com/
|
|
5 |
Description: Hide and increase Security for your WordPress website instance using smart techniques. No files are changed on your server.
|
6 |
Author: Nsp Code
|
7 |
Author URI: http://www.nsp-code.com
|
8 |
-
Version: 1.6.1.
|
9 |
Text Domain: wp-hide-security-enhancer
|
10 |
Domain Path: /languages/
|
11 |
*/
|
5 |
Description: Hide and increase Security for your WordPress website instance using smart techniques. No files are changed on your server.
|
6 |
Author: Nsp Code
|
7 |
Author URI: http://www.nsp-code.com
|
8 |
+
Version: 1.6.1.3
|
9 |
Text Domain: wp-hide-security-enhancer
|
10 |
Domain Path: /languages/
|
11 |
*/
|