WP Hide & Security Enhancer - Version 1.5.6.9

Version Description

  • New functionality: Remove Link Header
Download this release

Release Info

Developer nsp-code
Plugin Icon 128x128 WP Hide & Security Enhancer
Version 1.5.6.9
Comparing to
See all releases

Code changes from version 1.5.6.8 to 1.5.6.9

include/wph.class.php CHANGED
@@ -873,21 +873,12 @@
873
 
874
  $process_interface_save_errors = array();
875
 
876
- if ( is_wp_error( $wp_filesystem->errors ) && isset($wp_filesystem->errors->errors) && is_array($wp_filesystem->errors->errors) && count ( $wp_filesystem->errors->errors ) > 0 )
877
  {
878
  delete_transient( 'wph-process_set_static_environment_errors' );
879
-
880
- $all_error_messages = array();
881
- if ( isset($wp_filesystem->errors->errors) && is_array($wp_filesystem->errors->errors) )
882
- {
883
- foreach ( (array) $wp_filesystem->errors->errors as $code => $messages )
884
- {
885
- $all_error_messages = array_merge( $all_error_messages, $messages );
886
- }
887
- }
888
-
889
  $process_interface_save_errors[] = array( 'type' => 'error',
890
- 'message' => __('Unable to create environment static file. The system returned the following error: ', 'wp-hide-security-enhancer') . implode(". ", $all_error_messages ) .
891
  '<br /><b>Remove description header from Style file</b> and <b>Child - Remove description header from Style file</b> ' . __('will not work correctly, so where turned off.', 'wp-hide-security-enhancer')
892
  );
893
  set_transient( 'wph-process_set_static_environment_errors', $process_interface_save_errors, 0 );
873
 
874
  $process_interface_save_errors = array();
875
 
876
+ if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() )
877
  {
878
  delete_transient( 'wph-process_set_static_environment_errors' );
879
+
 
 
 
 
 
 
 
 
 
880
  $process_interface_save_errors[] = array( 'type' => 'error',
881
+ 'message' => __('Unable to create environment static file. The system returned the following error: ', 'wp-hide-security-enhancer') . implode(". ", $wp_filesystem->errors->get_error_messages() ) .
882
  '<br /><b>Remove description header from Style file</b> and <b>Child - Remove description header from Style file</b> ' . __('will not work correctly, so where turned off.', 'wp-hide-security-enhancer')
883
  );
884
  set_transient( 'wph-process_set_static_environment_errors', $process_interface_save_errors, 0 );
modules/components/general-headers.php CHANGED
@@ -11,6 +11,25 @@
11
 
12
  function get_module_settings()
13
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  $this->module_settings[] = array(
15
  'id' => 'remove_x_powered_by',
16
  'label' => __('Remove X-Powered-By Header', 'wp-hide-security-enhancer'),
@@ -49,6 +68,15 @@
49
  return $this->module_settings;
50
  }
51
 
 
 
 
 
 
 
 
 
 
52
 
53
 
54
  function _init_remove_x_powered_by($saved_field_data)
11
 
12
  function get_module_settings()
13
  {
14
+
15
+ $this->module_settings[] = array(
16
+ 'id' => 'remove_header_link',
17
+ 'label' => __('Remove Link Header', 'wp-hide-security-enhancer'),
18
+ 'description' => __('Remove Link Header being set as default by WordPress which outputs the site JSON url.', 'wp-hide-security-enhancer') . ' ' .
19
+ __('More details at ', 'wp-hide-security-enhancer') . '<a target="_blank" href="http://www.wp-hide.com/documentation/request-headers/">Request Headers</a>',
20
+
21
+ 'input_type' => 'radio',
22
+ 'options' => array(
23
+ 'yes' => __('Yes', 'wp-hide-security-enhancer'),
24
+ 'no' => __('No', 'wp-hide-security-enhancer'),
25
+ ),
26
+ 'default_value' => 'no',
27
+
28
+ 'sanitize_type' => array('sanitize_title', 'strtolower'),
29
+ 'processing_order' => 70
30
+ );
31
+
32
+
33
  $this->module_settings[] = array(
34
  'id' => 'remove_x_powered_by',
35
  'label' => __('Remove X-Powered-By Header', 'wp-hide-security-enhancer'),
68
  return $this->module_settings;
69
  }
70
 
71
+
72
+ function _init_remove_header_link( $saved_field_data )
73
+ {
74
+ if(empty($saved_field_data) || $saved_field_data == 'no')
75
+ return FALSE;
76
+
77
+ remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
78
+
79
+ }
80
 
81
 
82
  function _init_remove_x_powered_by($saved_field_data)
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.1.1
7
- Stable tag: 1.5.6.8
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
@@ -204,6 +204,7 @@ Since version 1.2 Change individual plugin urls which make them unrecognizable,
204
 
205
  **General / Html > Headers**
206
 
 
207
  * Remove X-Powered-By Header
208
  * Remove X-Pingback Header
209
 
@@ -291,6 +292,9 @@ Please get in touch with us and we'll do our best to include it for a next versi
291
 
292
  == Changelog ==
293
 
 
 
 
294
  = 1.5.6.8 =
295
  * Fix: Call for invalid method WP_Error::has_errors()
296
  * Fix: Attempt to clear Opcache if API not being restricted
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.1.1
7
+ Stable tag: 1.5.6.9
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
204
 
205
  **General / Html > Headers**
206
 
207
+ * Remove Link Header
208
  * Remove X-Powered-By Header
209
  * Remove X-Pingback Header
210
 
292
 
293
  == Changelog ==
294
 
295
+ = 1.5.6.9 =
296
+ * New functionality: Remove Link Header
297
+
298
  = 1.5.6.8 =
299
  * Fix: Call for invalid method WP_Error::has_errors()
300
  * Fix: Attempt to clear Opcache if API not being restricted
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.5.6.8
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.5.6.9
9
  Text Domain: wp-hide-security-enhancer
10
  Domain Path: /languages/
11
  */