WP Hide & Security Enhancer - Version 1.3.9.1

Version Description

  • fix: Child theme settings not showing up
  • Use register_theme_directory if empty $wp_theme_directories
  • Plugin Options validation improvements for unique slug
Download this release

Release Info

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

Code changes from version 1.3.9 to 1.3.9.1

Files changed (3) hide show
  1. include/functions.class.php +22 -9
  2. readme.txt +6 -1
  3. wp-hide.php +1 -1
include/functions.class.php CHANGED
@@ -202,28 +202,36 @@
202
  $errors = FALSE;
203
  $process_interface_save_errors = array();
204
 
 
 
 
 
 
 
 
205
  //clean the just updated fields within main settings array
206
  foreach($unique_require_updated_settings as $field_name => $data)
207
  {
208
- if( isset($wph->settings['module_settings'][ $field_name ]) )
209
- $wph->settings['module_settings'][ $field_name ] = '';
210
 
211
  //check if the value already exists in other setting
212
- if(array_search( $data['value'] , $wph->settings['module_settings']) !== FALSE)
213
  {
214
  $errors = TRUE;
215
  $process_interface_save_errors[] = __('Value', 'wp-hide-security-enhancer') . ' <b>' . $data['value'] .'</b> ' . __('set for', 'wp-hide-security-enhancer') . ' ' . __($data['module_name'], 'wp-hide-security-enhancer') . ' ' . __('already in use for another option.', 'wp-hide-security-enhancer');
216
  }
 
 
 
 
217
  }
218
 
219
  if( $errors === FALSE)
220
  {
221
- //save the options list to main array
222
- foreach($unique_require_updated_settings as $field_name => $data)
223
- {
224
- $wph->settings['module_settings'][ $field_name ] = $data['value'];
225
- }
226
-
227
  //update the settings
228
  $this->update_settings($wph->settings);
229
 
@@ -1565,6 +1573,11 @@
1565
  $defaults = array( 'errors' => false, 'allowed' => null, 'blog_id' => 0 );
1566
  $args = wp_parse_args( $args, $defaults );
1567
 
 
 
 
 
 
1568
  $theme_directories = search_theme_directories();
1569
 
1570
  if ( count( $wp_theme_directories ) > 1 ) {
202
  $errors = FALSE;
203
  $process_interface_save_errors = array();
204
 
205
+ //put the new values into a temporary settings variable
206
+ $_settings_ = $wph->settings['module_settings'];
207
+ foreach($unique_require_updated_settings as $field_name => $data)
208
+ {
209
+ $_settings_[ $field_name ] = $data['value'];
210
+ }
211
+
212
  //clean the just updated fields within main settings array
213
  foreach($unique_require_updated_settings as $field_name => $data)
214
  {
215
+ if( isset($_settings_[ $field_name ]) )
216
+ $_settings_[ $field_name ] = '';
217
 
218
  //check if the value already exists in other setting
219
+ if(array_search( $data['value'] , $_settings_) !== FALSE)
220
  {
221
  $errors = TRUE;
222
  $process_interface_save_errors[] = __('Value', 'wp-hide-security-enhancer') . ' <b>' . $data['value'] .'</b> ' . __('set for', 'wp-hide-security-enhancer') . ' ' . __($data['module_name'], 'wp-hide-security-enhancer') . ' ' . __('already in use for another option.', 'wp-hide-security-enhancer');
223
  }
224
+
225
+ //put the value back
226
+ $_settings_[ $field_name ] = $data['value'];
227
+
228
  }
229
 
230
  if( $errors === FALSE)
231
  {
232
+ //put to main setting holder
233
+ $wph->settings['module_settings'] = $_settings_;
234
+
 
 
 
235
  //update the settings
236
  $this->update_settings($wph->settings);
237
 
1573
  $defaults = array( 'errors' => false, 'allowed' => null, 'blog_id' => 0 );
1574
  $args = wp_parse_args( $args, $defaults );
1575
 
1576
+
1577
+ // Register the default theme directory root
1578
+ if ( count( $wp_theme_directories ) < 1 )
1579
+ register_theme_directory( get_theme_root() );
1580
+
1581
  $theme_directories = search_theme_directories();
1582
 
1583
  if ( count( $wp_theme_directories ) > 1 ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.nsp-code.com/donate.php
4
  Tags: hide, security, improve security, hacking, wp hide, wordpress hide, custom login url, wp-loging.php, ap-admin
5
  Requires at least: 2.8
6
  Tested up to: 4.7.1
7
- Stable tag: 1.3.9
8
  License: GPLv2 or later
9
 
10
  Hide and increase Security for your WordPress website instance using smart techniques. No files are changed on your server.
@@ -239,6 +239,11 @@ Please get in touch with us and we'll do our best to include it for a next versi
239
 
240
  == Changelog ==
241
 
 
 
 
 
 
242
  = 1.3.9 =
243
  * General / Html > Meta -> new option Remove DNS Prefetch
244
  * New component - Comments
4
  Tags: hide, security, improve security, hacking, wp hide, wordpress hide, custom login url, wp-loging.php, ap-admin
5
  Requires at least: 2.8
6
  Tested up to: 4.7.1
7
+ Stable tag: 1.3.9.1
8
  License: GPLv2 or later
9
 
10
  Hide and increase Security for your WordPress website instance using smart techniques. No files are changed on your server.
239
 
240
  == Changelog ==
241
 
242
+ = 1.3.9.1 =
243
+ * fix: Child theme settings not showing up
244
+ * Use register_theme_directory if empty $wp_theme_directories
245
+ * Plugin Options validation improvements for unique slug
246
+
247
  = 1.3.9 =
248
  * General / Html > Meta -> new option Remove DNS Prefetch
249
  * New component - Comments
wp-hide.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.nsp-code.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.3.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.3.9.1
9
  Text Domain: wp-hide-security-enhancer
10
  Domain Path: /languages/
11
  */