WP Hide & Security Enhancer - Version 1.6.2.3

Version Description

  • Reverse URLs when saving a options, to avoid custom urls to be writted within the database.
Download this release

Release Info

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

Code changes from version 1.6.2.0.4 to 1.6.2.3

compatibility/oxygen-class.php CHANGED
@@ -1,5 +1,12 @@
1
  <?php
2
 
 
 
 
 
 
 
 
3
 
4
  Class WPH_OXYGEN_VSB_Signature extends OXYGEN_VSB_Signature
5
  {
1
  <?php
2
 
3
+
4
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
5
+
6
+ if(!class_exists('OXYGEN_VSB_Signature'))
7
+ {
8
+ include_once( ABSPATH . 'wp-content/plugins/oxygen/functions.php' );
9
+ }
10
 
11
  Class WPH_OXYGEN_VSB_Signature extends OXYGEN_VSB_Signature
12
  {
compatibility/wp-simple-firewall.php CHANGED
@@ -43,6 +43,9 @@
43
 
44
  static public function on_plugins_loaded()
45
  {
 
 
 
46
 
47
  $oICWP_Wpsf_Controller = Shield\Controller\Controller::GetInstance( WP_PLUGIN_DIR . '/wp-simple-firewall/src/login_protect.php' );
48
 
43
 
44
  static public function on_plugins_loaded()
45
  {
46
+
47
+ if ( ! class_exists( 'FernleafSystems\Wordpress\Plugin\Shield\Controller\Controller' ) )
48
+ return;
49
 
50
  $oICWP_Wpsf_Controller = Shield\Controller\Controller::GetInstance( WP_PLUGIN_DIR . '/wp-simple-firewall/src/login_protect.php' );
51
 
include/wph.class.php CHANGED
@@ -163,9 +163,10 @@
163
 
164
  //ensure the media urls are being saved using default WordPress urls
165
  add_action( 'save_post', array($this, 'save_post'), 999 );
166
-
167
  //ensure meta data is being saved using default WordPress urls
168
  add_action( 'update_post_metadata', array($this, 'update_post_metadata'), 999, 5 );
 
 
169
 
170
  //restart the buffering if already outputed. This is usefull for plugin / theme update iframe
171
  add_action('admin_print_footer_scripts', array($this, 'admin_print_footer_scripts'), -1);
@@ -280,11 +281,11 @@
280
  * Retrieve the rewrite results from component
281
  *
282
  */
283
- private function _run_component_callback( $_callback, $_callback_arguments, $_class_instance, $saved_field_value)
284
  {
285
 
286
  if ( ! empty($_callback_arguments) && is_array($_callback_arguments) && count($_callback_arguments) > 0 )
287
- $module_processing_data = call_user_func_array( array($_class_instance, $_callback), array_merge( array( 'field_value' => $saved_field_value), $_callback_arguments));
288
  else
289
  $module_processing_data = call_user_func(array($_class_instance, $_callback), $saved_field_value);
290
 
@@ -1010,7 +1011,7 @@
1010
  return;
1011
  }
1012
 
1013
- if ( $this->functions->is_muloader() && version_compare( WPH_MULOADER_VERSION, '1.3.5', '<' ) )
1014
  {
1015
  $status = $this->functions->copy_mu_loader( TRUE );
1016
  if ( $status )
@@ -1628,6 +1629,80 @@
1628
  }
1629
 
1630
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1631
 
1632
  /**
1633
  * Restart the bufering if turned off already
163
 
164
  //ensure the media urls are being saved using default WordPress urls
165
  add_action( 'save_post', array($this, 'save_post'), 999 );
 
166
  //ensure meta data is being saved using default WordPress urls
167
  add_action( 'update_post_metadata', array($this, 'update_post_metadata'), 999, 5 );
168
+ //revert any urls back to original before save
169
+ add_filter( 'pre_update_option', array($this, 'pre_update_option'), 99, 3);
170
 
171
  //restart the buffering if already outputed. This is usefull for plugin / theme update iframe
172
  add_action('admin_print_footer_scripts', array($this, 'admin_print_footer_scripts'), -1);
281
  * Retrieve the rewrite results from component
282
  *
283
  */
284
+ private function _run_component_callback( $_callback, $_callback_arguments, $_class_instance, $saved_field_value = '' )
285
  {
286
 
287
  if ( ! empty($_callback_arguments) && is_array($_callback_arguments) && count($_callback_arguments) > 0 )
288
+ $module_processing_data = call_user_func_array( array($_class_instance, $_callback), array_values ( array_merge( array( 'field_value' => $saved_field_value), $_callback_arguments) ) );
289
  else
290
  $module_processing_data = call_user_func(array($_class_instance, $_callback), $saved_field_value);
291
 
1011
  return;
1012
  }
1013
 
1014
+ if ( $this->functions->is_muloader() && ( !defined( 'WPH_MULOADER_VERSION' ) || version_compare( WPH_MULOADER_VERSION, '1.3.5', '<' ) ) )
1015
  {
1016
  $status = $this->functions->copy_mu_loader( TRUE );
1017
  if ( $status )
1629
  }
1630
 
1631
 
1632
+
1633
+ /**
1634
+ * Revert the option value before saving
1635
+ *
1636
+ * @param mixed $query
1637
+ */
1638
+ function pre_update_option( $value, $option, $old_value )
1639
+ {
1640
+
1641
+ if ( $value === $old_value || maybe_serialize( $value ) === maybe_serialize( $old_value ) )
1642
+ return $value;
1643
+
1644
+ //ignore specific options
1645
+ if ( apply_filters('wph/reverse_urls/pre_update_option', $option, FALSE ) )
1646
+ return $value;
1647
+
1648
+ $replacement_list = $this->functions->get_replacement_list();
1649
+ if ( count ( $replacement_list ) < 1 )
1650
+ return $value;
1651
+
1652
+ $replacement_list = array_flip($replacement_list);
1653
+
1654
+ $value = $this->option_block_revert( $value, $replacement_list );
1655
+
1656
+ return $value;
1657
+ }
1658
+
1659
+
1660
+ /**
1661
+ * Ignore the plugin option when saving
1662
+ *
1663
+ * @param mixed $option_name
1664
+ * @param mixed $ignore_status
1665
+ */
1666
+ function reverse_urls_pre_update_option( $option_name, $ignore_status )
1667
+ {
1668
+
1669
+ if ( !in_array( $option_name, array ( 'wph_settings', 'wph-previous-options-list' )) )
1670
+ return $ignore_status;
1671
+
1672
+ $ignore_status = TRUE;
1673
+
1674
+ return $ignore_status;
1675
+ }
1676
+
1677
+
1678
+ function option_block_revert( $data, $replacement_list )
1679
+ {
1680
+ switch (gettype($data))
1681
+ {
1682
+ case 'array':
1683
+ foreach ($data as $key => $value)
1684
+ {
1685
+ $data[$key] = $this->option_block_revert( $value, $replacement_list );
1686
+ }
1687
+ break;
1688
+
1689
+ case 'object':
1690
+ foreach ($data as $key => $value)
1691
+ {
1692
+ $data->$key = $this->option_block_revert( $value, $replacement_list );
1693
+ }
1694
+ break;
1695
+
1696
+ case 'string':
1697
+ $data = $this->functions->content_urls_replacement( $data, $replacement_list );
1698
+
1699
+ break;
1700
+ }
1701
+
1702
+ return $data;
1703
+ }
1704
+
1705
+
1706
 
1707
  /**
1708
  * Restart the bufering if turned off already
modules/components/general-admin-bar.php CHANGED
@@ -71,7 +71,7 @@
71
 
72
 
73
 
74
- function _init_remove_admin_bar( $saved_field_data, $role )
75
  {
76
  if(empty($saved_field_data) || $saved_field_data == 'no')
77
  return FALSE;
71
 
72
 
73
 
74
+ function _init_remove_admin_bar( $saved_field_data )
75
  {
76
  if(empty($saved_field_data) || $saved_field_data == 'no')
77
  return FALSE;
readme.txt CHANGED
@@ -349,6 +349,9 @@ Please get in touch with us and we'll do our best to include it for a next versi
349
 
350
  == Changelog ==
351
 
 
 
 
352
  = 1.6.2.0.4 =
353
  * Update Compatibility file with Oxygen editor, for image with link wrapper
354
  * WordPress 5.6 compatibility tag update
349
 
350
  == Changelog ==
351
 
352
+ = 1.6.2.3 =
353
+ * Reverse URLs when saving a options, to avoid custom urls to be writted within the database.
354
+
355
  = 1.6.2.0.4 =
356
  * Update Compatibility file with Oxygen editor, for image with link wrapper
357
  * WordPress 5.6 compatibility tag update
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.2.0.4
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.2.3
9
  Text Domain: wp-hide-security-enhancer
10
  Domain Path: /languages/
11
  */