WP Hide & Security Enhancer - Version 1.5.6

Version Description

  • Fix BBPress menus by calling directly the wp_user_roles option ratter get_roles()
  • Replace comments within inline JavaScript code when Remove Comments active
  • Possible login conflict notices when using WebArx, WPS Hide Login
  • New action wp-hide/admin_notices when plugin admin notices
  • Return updated url when calling admin_url instead replaced when buffer outputs to ensure compatibility with specific plugins
Download this release

Release Info

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

Code changes from version 1.5.5.9 to 1.5.6

compatibility/webarx.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class WPH_conflict_webarx
5
+ {
6
+
7
+ static function init()
8
+ {
9
+ if( ! self::is_plugin_active())
10
+ return FALSE;
11
+
12
+ add_action( 'wp-hide/admin_notices', array( 'WPH_conflict_webarx', 'login_conflicts') );
13
+
14
+
15
+ }
16
+
17
+ static function is_plugin_active()
18
+ {
19
+
20
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
21
+
22
+ if(is_plugin_active( 'webarx/webarx.php' ))
23
+ return TRUE;
24
+ else
25
+ return FALSE;
26
+ }
27
+
28
+ static function login_conflicts( )
29
+ {
30
+ global $wph;
31
+
32
+ $new_login = $wph->functions->get_module_item_setting('new_wp_login_php');
33
+ if ( empty ( $new_login ) )
34
+ return;
35
+
36
+ echo "<div class='error'><p><b>". __("WP Hide Conflict Notice.", 'wp-hide-security-enhancer') . "</b> ". __("You use another plugin (WPS Hide Login) to change the default wp-login.php. To avoid conflicts, activate the option within a single code.", 'wp-hide-security-enhancer') .'</p></div>';
37
+
38
+ }
39
+
40
+
41
+ }
42
+
43
+
44
+ ?>
compatibility/wps-hide-login.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class WPH_conflict_wps_hide_login
5
+ {
6
+
7
+ static function init()
8
+ {
9
+ if( ! self::is_plugin_active())
10
+ return FALSE;
11
+
12
+ add_action( 'wp-hide/admin_notices', array( 'WPH_conflict_webarx', 'login_conflicts') );
13
+
14
+
15
+ }
16
+
17
+ static function is_plugin_active()
18
+ {
19
+
20
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
21
+
22
+ if(is_plugin_active( 'wps-hide-login/wps-hide-login.php' ))
23
+ return TRUE;
24
+ else
25
+ return FALSE;
26
+ }
27
+
28
+ static function login_conflicts( )
29
+ {
30
+ global $wph;
31
+
32
+ $new_login = $wph->functions->get_module_item_setting('new_wp_login_php');
33
+ if ( empty ( $new_login ) )
34
+ return;
35
+
36
+ if ( get_option( 'webarx_mv_wp_login' ) && get_option( 'webarx_rename_wp_login' ) )
37
+ {
38
+ echo "<div class='error'><p><b>". __("WP Hide Conflict Notice.", 'wp-hide-security-enhancer') . "</b> ". __("You use another plugin (WebARX) to change the default wp-login.php. To avoid conflicts, activate the option within a single code.", 'wp-hide-security-enhancer') .'</p></div>';
39
+ }
40
+
41
+ }
42
+
43
+
44
+ }
45
+
46
+
47
+ ?>
include/admin-interface.class.php CHANGED
@@ -235,7 +235,7 @@
235
  {
236
  ?>
237
  <div class="wph-notice">
238
- <p class="important"><span class="dashicons dashicons-warning important" alt="f534"></span><?php _e('Copy the following link to a safe place, which you can use to reset all options, if something go wrong.', 'wp-hide-security-enhancer') ?> <span id="wph-recovery-link" onClick="WPH.selectText( 'wph-recovery-link' )"><?php echo site_url() ?>?wph-recovery=<?php echo $this->functions->get_recovery_code() ?></span></p>
239
  </div>
240
  <?php
241
 
235
  {
236
  ?>
237
  <div class="wph-notice">
238
+ <p class="important"><span class="dashicons dashicons-warning important" alt="f534"></span><?php _e('Copy the following link to a safe place. You can use later to reset all plugin options, if something go wrong.', 'wp-hide-security-enhancer') ?> <span id="wph-recovery-link" onClick="WPH.selectText( 'wph-recovery-link' )"><?php echo site_url() ?>?wph-recovery=<?php echo $this->functions->get_recovery_code() ?></span></p>
239
  </div>
240
  <?php
241
 
include/class.compatibility.php CHANGED
@@ -67,6 +67,14 @@
67
  include_once(WPH_PATH . 'compatibility/shortpixel-adaptive-images.php');
68
  WPH_conflict_shortpixel_ai::init();
69
 
 
 
 
 
 
 
 
 
70
  /**
71
  * Themes
72
  */
67
  include_once(WPH_PATH . 'compatibility/shortpixel-adaptive-images.php');
68
  WPH_conflict_shortpixel_ai::init();
69
 
70
+ //WebArx
71
+ include_once(WPH_PATH . 'compatibility/webarx.php');
72
+ WPH_conflict_webarx::init();
73
+
74
+ //WPS Hide Login
75
+ include_once(WPH_PATH . 'compatibility/wps-hide-login.php');
76
+ WPH_conflict_wps_hide_login::init();
77
+
78
  /**
79
  * Themes
80
  */
include/wph.class.php CHANGED
@@ -370,10 +370,11 @@
370
  {
371
  global $wp_rewrite;
372
 
 
373
 
374
  if ( getenv('IS_WPE') == "1" || getenv('IS_WPE_SNAPSHOT') == "1" )
375
  {
376
- echo "<div class='error'><p><b>WP Hide</b> ". __("Your server run on WPEngine which works on Nginx rewrite rules, please check with WP Hide PRO version at.", 'wp-hide-security-enhancer') .' <a target="_blank" href="https://www.wp-hide.com/wp-hide-pro-now-available/">WP-Hide PRO</a><</p></div>';
377
  }
378
 
379
  if ( is_multisite() )
@@ -450,7 +451,7 @@
450
  }
451
 
452
  if( $found_errors === FALSE )
453
- echo "<div class='notice notice-success'><p>". __('Settings saved', 'wp-hide-security-enhancer') ."</p></div>";
454
 
455
  if( is_array($process_interface_save_errors) && count($process_interface_save_errors) > 0)
456
  {
370
  {
371
  global $wp_rewrite;
372
 
373
+ do_action('wp-hide/admin_notices');
374
 
375
  if ( getenv('IS_WPE') == "1" || getenv('IS_WPE_SNAPSHOT') == "1" )
376
  {
377
+ echo "<div class='error'><p><b>WP Hide</b> ". __("Your server run on WPEngine which works on Nginx rewrite rules, please check with WP Hide PRO version at.", 'wp-hide-security-enhancer') .' <a target="_blank" href="https://www.wp-hide.com/wp-hide-pro-now-available/">WP-Hide PRO</a></p></div>';
378
  }
379
 
380
  if ( is_multisite() )
451
  }
452
 
453
  if( $found_errors === FALSE )
454
+ echo "<div class='notice notice-success'><p>". __('Settings saved', 'wp-hide-security-enhancer') ."<br />" . __('Remember, site cache clear is required.', 'wp-hide-security-enhancer') ."</p></div>";
455
 
456
  if( is_array($process_interface_save_errors) && count($process_interface_save_errors) > 0)
457
  {
modules/components/admin-admin_url.php CHANGED
@@ -266,8 +266,8 @@
266
 
267
  function update_admin_url( $url, $path, $blog_id )
268
  {
269
- if( strpos( $_SERVER['REQUEST_URI'], "/admin-ajax.php") === FALSE )
270
- return $url;
271
 
272
  //replace the wp-admin with custom slug
273
  $admin_url = $this->wph->functions->get_module_item_setting('admin_url');
266
 
267
  function update_admin_url( $url, $path, $blog_id )
268
  {
269
+ //if( strpos( $_SERVER['REQUEST_URI'], "/admin-ajax.php") === FALSE )
270
+ //return $url;
271
 
272
  //replace the wp-admin with custom slug
273
  $admin_url = $this->wph->functions->get_module_item_setting('admin_url');
modules/components/general-admin-bar.php CHANGED
@@ -16,9 +16,9 @@
16
  function get_module_settings()
17
  {
18
 
19
- $wp_roles = wp_roles();
20
 
21
- foreach ( $wp_roles->roles as $role_slug => $role )
22
  {
23
 
24
  $this->module_settings[] = $this->_prepare_modle_setting( $role_slug, $role['name'] );
16
  function get_module_settings()
17
  {
18
 
19
+ $wp_roles = get_option('wp_user_roles');
20
 
21
+ foreach ( $wp_roles as $role_slug => $role )
22
  {
23
 
24
  $this->module_settings[] = $this->_prepare_modle_setting( $role_slug, $role['name'] );
modules/components/general-html.php CHANGED
@@ -149,9 +149,12 @@
149
  if(defined('WP_ADMIN'))
150
  return $buffer;
151
 
152
- //replace any comments
153
  $buffer = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->)(.|\n))*-->/sm', "" , $buffer);
154
 
 
 
 
155
  //remove empty multiple new lines
156
  $buffer = preg_replace("/(\n){2,}/", "\n", $buffer);
157
 
149
  if(defined('WP_ADMIN'))
150
  return $buffer;
151
 
152
+ //replace any Html comments
153
  $buffer = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->)(.|\n))*-->/sm', "" , $buffer);
154
 
155
+ //replace any JavaScript comments
156
+ $buffer = preg_replace('/\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$/sm', "" , $buffer);
157
+
158
  //remove empty multiple new lines
159
  $buffer = preg_replace("/(\n){2,}/", "\n", $buffer);
160
 
readme.txt CHANGED
@@ -4,10 +4,10 @@ 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.5.9
8
  License: GPLv2 or later
9
 
10
- Hide and increase Security for your WordPress site instance using smart techniques. No files are changed on your server.
11
 
12
  == Description ==
13
 
@@ -231,6 +231,8 @@ Since version 1.2 Change individual plugin urls which make them unrecognizable,
231
 
232
  * CDN Url - Set-up CDN if apply, some providers replace site assets with custom urls.
233
 
 
 
234
  <br />Something is wrong with this plugin on your site? Just use the forum or get in touch with us at <a target="_blank" href="http://www.wp-hide.com">Contact</a> and we'll check it out.
235
 
236
  <br />A website example can be found at <a target="_blank" href="http://nsp-code.com/demo/wp-hide/">http://nsp-code.com/demo/wp-hide/</a> or our website <a target="_blank" href="http://www.wp-hide.com/">WP Hide and Security Enhancer</a>
@@ -258,12 +260,16 @@ Absolute none! No file and directory is being changed anywhere, everything is pr
258
 
259
  Everything works as before, no functionality is being breaked. You can run updates at any time.
260
 
 
 
 
 
261
  = Something is wrong, what can i do? How can i recover my site? =
262
 
263
  * First, stay calm. There will be no harm, guaranteed :)
264
  * Go to admin and change some of plugin options to see which one cause the problem. Then report it to forum or get in touch with us to fix it.
265
  * If you can't login to admin, use the Recovery Link which has been sent to your e-mail. This will reset the login to default.
266
- * If none of above worked for you, or you can't find the recovery link, delete the plugin from your wp-content/plugins directory. Then remove any lines in your .htaccess file between
267
  BEGIN WP Hide & Security Enhancer
268
  ..
269
  END WP Hide & Security Enhancer
@@ -285,6 +291,13 @@ Please get in touch with us and we'll do our best to include it for a next versi
285
 
286
  == Changelog ==
287
 
 
 
 
 
 
 
 
288
  = 1.5.5.9 =
289
  * Compatibility module for ShortPixel Adaptive Image plugin
290
  * Add support for texarea fields within plugin options interface
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
  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
11
 
12
  == Description ==
13
 
231
 
232
  * CDN Url - Set-up CDN if apply, some providers replace site assets with custom urls.
233
 
234
+ <br />This free version works with Apache and IIS server types.
235
+
236
  <br />Something is wrong with this plugin on your site? Just use the forum or get in touch with us at <a target="_blank" href="http://www.wp-hide.com">Contact</a> and we'll check it out.
237
 
238
  <br />A website example can be found at <a target="_blank" href="http://nsp-code.com/demo/wp-hide/">http://nsp-code.com/demo/wp-hide/</a> or our website <a target="_blank" href="http://www.wp-hide.com/">WP Hide and Security Enhancer</a>
260
 
261
  Everything works as before, no functionality is being breaked. You can run updates at any time.
262
 
263
+ = What servers this plugin can work =
264
+
265
+ This free code can with Apache and IIS server types. For all others check the PRO version at http://www.wp-hide.com
266
+
267
  = Something is wrong, what can i do? How can i recover my site? =
268
 
269
  * First, stay calm. There will be no harm, guaranteed :)
270
  * Go to admin and change some of plugin options to see which one cause the problem. Then report it to forum or get in touch with us to fix it.
271
  * If you can't login to admin, use the Recovery Link which has been sent to your e-mail. This will reset the login to default.
272
+ * If you can't find the recovery link or none mentioned above worked, delete the plugin from your wp-content/plugins directory. Then remove any lines in your .htaccess file between
273
  BEGIN WP Hide & Security Enhancer
274
  ..
275
  END WP Hide & Security Enhancer
291
 
292
  == Changelog ==
293
 
294
+ = 1.5.6 =
295
+ * Fix BBPress menus by calling directly the wp_user_roles option ratter get_roles()
296
+ * Replace comments within inline JavaScript code when Remove Comments active
297
+ * Possible login conflict notices when using WebArx, WPS Hide Login
298
+ * New action wp-hide/admin_notices when plugin admin notices
299
+ * Return updated url when calling admin_url instead replaced when buffer outputs to ensure compatibility with specific plugins
300
+
301
  = 1.5.5.9 =
302
  * Compatibility module for ShortPixel Adaptive Image plugin
303
  * Add support for texarea fields within plugin options interface
router/environment.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2
- $environment_variable = '{"theme":{"folder_name":"twentysixteen","mapped_name":"eereer"},"allowed_paths":["F:\/htdocs\/wp-hide.dev\/wp-content\/themes"],"cache_path":"F:\/htdocs\/wp-hide.dev\/wp-content\/cache\/wph\/","wordpress_directory":"","site_relative_path":"\/"}' ?>
1
  <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2
+ $environment_variable = '{"theme":{"folder_name":"twentyfifteen","mapped_name":"eereer"},"child_theme":{"folder_name":"child-theme","mapped_name":""},"allowed_paths":["F:\/htdocs\/wp-hide.dev\/wp-content\/themes"],"cache_path":"F:\/htdocs\/wp-hide.dev\/wp-content\/cache\/wph\/","wordpress_directory":"","site_relative_path":"\/"}' ?>
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.5.9
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
  Text Domain: wp-hide-security-enhancer
10
  Domain Path: /languages/
11
  */