WP Hide & Security Enhancer - Version 1.4.6.5

Version Description

  • Fixed hardcoded wp-register.php within rewrite - root files component
  • Updated components to rewrite_base / rewrite_to system
  • Improved components: Rewrite - WP Includes, Rewrite - WP Content, Rewrite - Plugins, Rewrite - Uploads, Rewrite - Comments, Rewrite - Root Files, Admin - wp-login.php, Admin - Admin Url
  • Typo fix environemnt to environment
  • New Component - Remove Shortlink Meta
  • New Component - Remove new line carriage
  • Apply relative paths change on styles only if main theme / child theme rewrite slug is not empty
  • Improved interface errors and warnings transient structure
  • Use ABSPATH and Environemnt data to create file path for file processing, instead just ABSPATH, for better compatibility
Download this release

Release Info

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

Code changes from version 1.4.5.6 to 1.4.6.5

css/wph.css CHANGED
@@ -14,7 +14,7 @@ table.wph_input tbody tr td.np {padding: 0px}
14
  table.wph_input tbody tr:first-child td,
15
  table.wph_input tbody tr:first-child td.label { border-top: 0 none;}
16
  table.wph_input tbody tr td.data { padding-bottom: 20px;}
17
- table.wph_input tbody tr td.data p.description {font-size: 14px}
18
  table.wph_input .dashicons {overflow: hidden}
19
 
20
  table.inner_table tbody tr td {padding-bottom: 12px}
14
  table.wph_input tbody tr:first-child td,
15
  table.wph_input tbody tr:first-child td.label { border-top: 0 none;}
16
  table.wph_input tbody tr td.data { padding-bottom: 20px;}
17
+ table.wph_input tbody tr td.data p.description {font-size: 12px; margin-bottom: 3px;}
18
  table.wph_input .dashicons {overflow: hidden}
19
 
20
  table.inner_table tbody tr td {padding-bottom: 12px}
include/functions.class.php CHANGED
@@ -204,6 +204,8 @@
204
  delete_transient( 'wph-process_interface_save_errors' );
205
 
206
  $errors = FALSE;
 
 
207
  $process_interface_save_errors = array();
208
 
209
  //put the new values into a temporary settings variable
@@ -223,13 +225,18 @@
223
  if(array_search( $data['value'] , $_settings_) !== FALSE)
224
  {
225
  $errors = TRUE;
226
- $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');
 
 
227
  }
228
 
229
  //put the value back
230
  $_settings_[ $field_name ] = $data['value'];
231
 
232
  }
 
 
 
233
 
234
  if( $errors === FALSE)
235
  {
@@ -242,11 +249,10 @@
242
  //trigger the settings changed action
243
  do_action('wph/settings_changed', $screen_slug, $tab_slug);
244
  }
245
- else
246
- {
247
- //store the error for display purpose
248
- set_transient( 'wph-process_interface_save_errors', $process_interface_save_errors, HOUR_IN_SECONDS );
249
- }
250
 
251
  //redirect
252
  $new_admin_url = $this->get_module_item_setting('admin_url' , 'admin');
@@ -729,6 +735,69 @@
729
  }
730
 
731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
 
733
 
734
  function insert_with_markers_on_top( $filename, $marker, $insertion)
@@ -962,9 +1031,12 @@
962
  'module_settings' => array(),
963
  'recovery_code' => ''
964
  );
 
965
 
966
  $settings = wp_parse_args( $settings, $defaults );
967
 
 
 
968
  return $settings;
969
 
970
  }
204
  delete_transient( 'wph-process_interface_save_errors' );
205
 
206
  $errors = FALSE;
207
+
208
+ global $process_interface_save_errors;
209
  $process_interface_save_errors = array();
210
 
211
  //put the new values into a temporary settings variable
225
  if(array_search( $data['value'] , $_settings_) !== FALSE)
226
  {
227
  $errors = TRUE;
228
+ $process_interface_save_errors[] = array( 'type' => 'error',
229
+ 'message' => __('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')
230
+ );
231
  }
232
 
233
  //put the value back
234
  $_settings_[ $field_name ] = $data['value'];
235
 
236
  }
237
+
238
+
239
+ $errors = apply_filters('wp-hide/interface/process', $errors, $_settings_, $module_settings);
240
 
241
  if( $errors === FALSE)
242
  {
249
  //trigger the settings changed action
250
  do_action('wph/settings_changed', $screen_slug, $tab_slug);
251
  }
252
+
253
+ //store the error for display purpose
254
+ if ( count ( $process_interface_save_errors ) > 0 )
255
+ set_transient( 'wph-process_interface_save_errors', $process_interface_save_errors, HOUR_IN_SECONDS );
 
256
 
257
  //redirect
258
  $new_admin_url = $this->get_module_item_setting('admin_url' , 'admin');
735
  }
736
 
737
 
738
+ /**
739
+ * Return rewrite base
740
+ *
741
+ */
742
+ function get_rewrite_base( $saved_field_data, $left_slash = TRUE, $right_slash = TRUE )
743
+ {
744
+ global $blog_id;
745
+
746
+ $saved_field_data = $this->untrailingslashit_all($saved_field_data);
747
+
748
+ $path = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) : '';
749
+ if(is_multisite())
750
+ {
751
+ $blog_details = get_blog_details( $blog_id );
752
+
753
+ $path = ltrim($blog_details->path, '/');
754
+ }
755
+
756
+ $rewrite_base = !empty($path) ? trailingslashit( $path ) . $saved_field_data : ( !empty($saved_field_data) ? '/' .$saved_field_data : '' );
757
+ if( !empty($rewrite_base))
758
+ {
759
+ $rewrite_base = $this->untrailingslashit_all( $rewrite_base );
760
+
761
+ if( $left_slash === TRUE )
762
+ $rewrite_base = '/' . $rewrite_base;
763
+
764
+ if( $right_slash === TRUE )
765
+ $rewrite_base = $rewrite_base . '/';
766
+
767
+ }
768
+
769
+ return $rewrite_base;
770
+
771
+ }
772
+
773
+ /**
774
+ * Return rewrite to base
775
+ *
776
+ */
777
+ function get_rewrite_to_base( $field_data, $left_slash = TRUE, $right_slash = TRUE )
778
+ {
779
+ global $blog_id;
780
+
781
+ $field_data = $this->untrailingslashit_all( $field_data );
782
+
783
+ $path = !empty($this->wph->default_variables['site_relative_path']) ? trailingslashit( $this->wph->default_variables['site_relative_path'] ) : '';
784
+
785
+ $rewrite_to_base = !empty($path) ? trailingslashit( $path ) . $field_data : ( !empty( $field_data ) ? '/' . $field_data : '' );
786
+ if( !empty($rewrite_to_base))
787
+ {
788
+ $rewrite_to_base = $this->untrailingslashit_all( $rewrite_to_base );
789
+
790
+ if( $left_slash === TRUE )
791
+ $rewrite_to_base = '/' . $rewrite_to_base;
792
+
793
+ if( $right_slash === TRUE )
794
+ $rewrite_to_base = $rewrite_to_base . '/';
795
+
796
+ }
797
+
798
+ return $rewrite_to_base;
799
+
800
+ }
801
 
802
 
803
  function insert_with_markers_on_top( $filename, $marker, $insertion)
1031
  'module_settings' => array(),
1032
  'recovery_code' => ''
1033
  );
1034
+
1035
 
1036
  $settings = wp_parse_args( $settings, $defaults );
1037
 
1038
+ $settings = apply_filters('wp-hide/get_settings', $settings);
1039
+
1040
  return $settings;
1041
 
1042
  }
include/update.class.php CHANGED
@@ -99,7 +99,7 @@
99
  }
100
 
101
  /**
102
- * Create the environemnt file
103
  */
104
  if(version_compare($version, '1.4', '<'))
105
  {
@@ -115,7 +115,7 @@
115
  }
116
 
117
  /**
118
- * Update the environemnt file and mu loader
119
  */
120
  if(version_compare($version, '1.4.1', '<'))
121
  {
@@ -201,8 +201,8 @@
201
 
202
 
203
 
204
- //Always generate the environemnt file
205
- $this->wph->set_static_environemnt_file();
206
 
207
 
208
  //save the last code version
99
  }
100
 
101
  /**
102
+ * Create the environment file
103
  */
104
  if(version_compare($version, '1.4', '<'))
105
  {
115
  }
116
 
117
  /**
118
+ * Update the environment file and mu loader
119
  */
120
  if(version_compare($version, '1.4.1', '<'))
121
  {
201
 
202
 
203
 
204
+ //Always generate the environment file
205
+ $this->wph->set_static_environment_file();
206
 
207
 
208
  //save the last code version
include/wph.class.php CHANGED
@@ -130,7 +130,7 @@
130
  add_action('wph/settings_changed', array($this, 'settings_changed'));
131
 
132
  //create the static file which contain different environment variables which will be used on router
133
- add_action('wph/settings_changed', array($this, 'set_static_environemnt_file'), 999);
134
 
135
  //apache
136
  //add_filter('mod_rewrite_rules', array($this, 'mod_rewrite_rules'), 999);
@@ -258,8 +258,8 @@
258
  */
259
  function on_init()
260
  {
261
- //create or update the environemnt file with required constants and variables
262
- $this->set_static_environemnt_file();
263
 
264
 
265
  }
@@ -398,21 +398,58 @@
398
 
399
  //check for interface save processing errors
400
  $process_interface_save_errors = get_transient( 'wph-process_interface_save_errors' );
401
- if( $process_interface_save_errors === FALSE || (is_array($process_interface_save_errors) && count($process_interface_save_errors) < 1))
402
- echo "<div class='updated'><p>". __('Settings saved', 'wp-hide-security-enhancer') ."</p></div>";
403
- else
 
 
404
  {
405
- //echo "<div class='error'><p>". __('Some errors occurred, no setting has been saved!', 'wp-hide-security-enhancer') ."</p></div>";
406
- echo "<div class='error'><p>";
407
-
408
- foreach ($process_interface_save_errors as $error)
409
  {
410
- echo $error .'<br />';
 
 
 
 
411
  }
412
 
413
- echo "</p></div>";
414
  }
415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  $this->functions->settings_changed_check_for_cache_plugins();
417
  }
418
 
@@ -477,7 +514,7 @@
477
  }
478
  }
479
 
480
- $buffer = apply_filters( 'wph/ob_start_callback', $buffer );
481
 
482
  if(isset($response_headers['Content-Encoding']) && $response_headers['Content-Encoding'] == "gzip")
483
  {
@@ -648,21 +685,21 @@
648
  * Create a staitc file which contain specific variables and will be used in router
649
  *
650
  */
651
- function set_static_environemnt_file( $force_create = FALSE )
652
  {
653
 
654
  $_environment_variable = array();
655
 
656
  $_environment_variable['theme'] = array(
657
  'folder_name' => $this->templates_data['main']['folder_name'],
658
- 'mapped_name' => $this->settings['module_settings']['new_theme_path']
659
  );
660
 
661
  if(isset($this->templates_data['child']))
662
  {
663
  $_environment_variable['child_theme'] = array(
664
  'folder_name' => $this->templates_data['child']['folder_name'],
665
- 'mapped_name' => $this->settings['module_settings']['new_theme_child_path']
666
  );
667
  }
668
 
@@ -677,7 +714,7 @@
677
  $themes_path = str_replace( '\\', '/', ABSPATH . ltrim($themes_url, '/'));
678
 
679
  //set the allowe paths
680
- $_environment_variable['allowed_paths'] = apply_filters('wp-hide/environemnt_file/allowed_paths', array( $themes_path ));
681
 
682
  $_environment_variable['cache_path'] = str_replace( '\\', '/', WPH_CACHE_PATH);
683
 
@@ -723,7 +760,9 @@
723
  $process_interface_save_errors = get_transient( 'wph-process_interface_save_errors' );
724
  delete_transient( 'wph-process_interface_save_errors' );
725
 
726
- $process_interface_save_errors[] = __('Unable to create environemnt static file. Is ', 'wp-hide-security-enhancer') . WPH_PATH . 'router/ ' . __('writable', 'wp-hide-security-enhancer') . '? <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');
 
 
727
 
728
  //disable certain options
729
  $this->settings['module_settings']['style_file_clean'] = 'no';
130
  add_action('wph/settings_changed', array($this, 'settings_changed'));
131
 
132
  //create the static file which contain different environment variables which will be used on router
133
+ add_action('wph/settings_changed', array($this, 'set_static_environment_file'), 999);
134
 
135
  //apache
136
  //add_filter('mod_rewrite_rules', array($this, 'mod_rewrite_rules'), 999);
258
  */
259
  function on_init()
260
  {
261
+ //create or update the environment file with required constants and variables
262
+ $this->set_static_environment_file();
263
 
264
 
265
  }
398
 
399
  //check for interface save processing errors
400
  $process_interface_save_errors = get_transient( 'wph-process_interface_save_errors' );
401
+
402
+ $found_warnings = FALSE;
403
+ $found_errors = FALSE;
404
+
405
+ if( is_array($process_interface_save_errors) && count($process_interface_save_errors) > 0)
406
  {
407
+ foreach ( $process_interface_save_errors as $process_interface_save_error )
 
 
 
408
  {
409
+ if($process_interface_save_error['type'] === 'warning')
410
+ $found_warnings = TRUE;
411
+
412
+ if($process_interface_save_error['type'] === 'error')
413
+ $found_errors = TRUE;
414
  }
415
 
 
416
  }
417
 
418
+ if( $found_errors === FALSE )
419
+ echo "<div class='notice notice-success'><p>". __('Settings saved', 'wp-hide-security-enhancer') ."</p></div>";
420
+
421
+ if( is_array($process_interface_save_errors) && count($process_interface_save_errors) > 0)
422
+ {
423
+ //display the warnings
424
+ if( $found_warnings === TRUE )
425
+ {
426
+ echo "<div class='notice notice-warning'><p>";
427
+ foreach ( $process_interface_save_errors as $process_interface_save_error )
428
+ {
429
+ if($process_interface_save_error['type'] == 'warning')
430
+ {
431
+ echo $process_interface_save_error['message'] .'<br />';
432
+ }
433
+ }
434
+ echo "</p></div>";
435
+ }
436
+
437
+ //display the errors
438
+ if( $found_errors === TRUE )
439
+ {
440
+ echo "<div class='notice notice-error'><p>";
441
+ foreach ( $process_interface_save_errors as $process_interface_save_error )
442
+ {
443
+ if($process_interface_save_error['type'] == 'error')
444
+ {
445
+ echo $process_interface_save_error['message'] .'<br />';
446
+ }
447
+ }
448
+ echo "</p></div>";
449
+ }
450
+
451
+ }
452
+
453
  $this->functions->settings_changed_check_for_cache_plugins();
454
  }
455
 
514
  }
515
  }
516
 
517
+ $buffer = apply_filters( 'wp-hide/ob_start_callback', $buffer );
518
 
519
  if(isset($response_headers['Content-Encoding']) && $response_headers['Content-Encoding'] == "gzip")
520
  {
685
  * Create a staitc file which contain specific variables and will be used in router
686
  *
687
  */
688
+ function set_static_environment_file( $force_create = FALSE )
689
  {
690
 
691
  $_environment_variable = array();
692
 
693
  $_environment_variable['theme'] = array(
694
  'folder_name' => $this->templates_data['main']['folder_name'],
695
+ 'mapped_name' => isset($this->settings['module_settings']['new_theme_path']) ? $this->settings['module_settings']['new_theme_path'] : ''
696
  );
697
 
698
  if(isset($this->templates_data['child']))
699
  {
700
  $_environment_variable['child_theme'] = array(
701
  'folder_name' => $this->templates_data['child']['folder_name'],
702
+ 'mapped_name' => isset($this->settings['module_settings']['new_theme_child_path']) ? $this->settings['module_settings']['new_theme_child_path'] : ''
703
  );
704
  }
705
 
714
  $themes_path = str_replace( '\\', '/', ABSPATH . ltrim($themes_url, '/'));
715
 
716
  //set the allowe paths
717
+ $_environment_variable['allowed_paths'] = apply_filters('wp-hide/environment_file/allowed_paths', array( $themes_path ));
718
 
719
  $_environment_variable['cache_path'] = str_replace( '\\', '/', WPH_CACHE_PATH);
720
 
760
  $process_interface_save_errors = get_transient( 'wph-process_interface_save_errors' );
761
  delete_transient( 'wph-process_interface_save_errors' );
762
 
763
+ $process_interface_save_errors[] = array( 'type' => 'error',
764
+ 'message' => __('Unable to create environment static file. Is ', 'wp-hide-security-enhancer') . WPH_PATH . 'router/ ' . __('writable', 'wp-hide-security-enhancer') . '? <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')
765
+ );
766
 
767
  //disable certain options
768
  $this->settings['module_settings']['style_file_clean'] = 'no';
languages/wp-hide-security-enhancer.mo CHANGED
Binary file
languages/wp-hide-security-enhancer.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
- "POT-Creation-Date: 2017-03-28 21:17+0200\n"
5
- "PO-Revision-Date: 2017-03-28 21:17+0200\n"
6
  "Last-Translator: NspCode <contact@nsp-code.com>\n"
7
  "Language-Team: \n"
8
  "MIME-Version: 1.0\n"
@@ -13,120 +13,126 @@ msgstr ""
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
- #: conflicts/wp-simple-firewall.php:97
17
  msgid ""
18
  "<b>Conflict notice</b>: The Security Firewall - Login Protection use the "
19
  "Rename WP Login Page functionality which is the same as WP Hide - Admin "
20
  "Login Url change. "
21
  msgstr ""
22
 
23
- #: include/functions.class.php:231
24
  msgid "Value"
25
  msgstr ""
26
 
27
- #: include/functions.class.php:231
28
  msgid "set for"
29
  msgstr ""
30
 
31
- #: include/functions.class.php:231
32
  msgid "already in use for another option."
33
  msgstr ""
34
 
35
- #: include/functions.class.php:324
36
  msgid ""
37
  "W3 Total Cache Plugin is active, make sure you clear the cache for new "
38
  "changes to apply"
39
  msgstr ""
40
 
41
- #: include/functions.class.php:328
42
  msgid ""
43
  "WP Super Cache Plugin is active, make sure you clear the cache for new "
44
  "changes to apply"
45
  msgstr ""
46
 
47
- #: include/functions.class.php:333
48
  msgid ""
49
  "WP Fastest Cache Plugin is active, make sure you clear the cache for new "
50
  "changes to apply"
51
  msgstr ""
52
 
53
- #: include/functions.class.php:1832
54
  #, php-format
55
  msgid "The %1$s plugin header is deprecated. Use %2$s instead."
56
  msgstr ""
57
 
58
- #: include/functions.class.php:1917
59
  #, php-format
60
  msgid "By %s."
61
  msgstr ""
62
 
63
- #: include/functions.class.php:2203
64
  msgid ""
65
  "Help us to improve this plugin by sending any improvement suggestions and "
66
  "reporting any issues at "
67
  msgstr ""
68
 
69
- #: include/functions.class.php:2204
70
  msgid ""
71
  "Did you find this plugin useful? Please support our work by spread the word "
72
  "about this, or write an article about the plugin in your blog with a link to "
73
  "development site"
74
  msgstr ""
75
 
76
- #: include/wph.class.php:303
77
  msgid "Are you sure to reset all settings? All options will be removed."
78
  msgstr ""
79
 
80
- #: include/wph.class.php:339
81
  msgid ""
82
  "Unable to launch WP Hide through mu-plugins/wp-hide-loader.php<br /> Please "
83
  "make sure this location is writable so the plugin create the required file."
84
  msgstr ""
85
 
86
- #: include/wph.class.php:345
87
  msgid ""
88
  "Permalink is required to be turned ON for WP Hide & Security Enhancer to work"
89
  msgstr ""
90
 
91
- #: include/wph.class.php:355 include/wph.class.php:382
 
 
 
 
 
 
92
  msgid ""
93
  "Unable to write custom rules to your .htaccess. Is this file writable? <br /"
94
  ">No mod is being applied."
95
  msgstr ""
96
 
97
- #: include/wph.class.php:358 include/wph.class.php:385
98
  msgid ""
99
  "Unable to write custom rules to your web.config. Is this file writable? <br /"
100
  ">No mod is being applied."
101
  msgstr ""
102
 
103
- #: include/wph.class.php:366
104
  msgid ""
105
  "Unable to create cache folder. Is the wp-content writable? <br />No cache "
106
  "data will be available."
107
  msgstr ""
108
 
109
- #: include/wph.class.php:371
110
  msgid "All Settings where restored to default"
111
  msgstr ""
112
 
113
- #: include/wph.class.php:390
114
  msgid "Settings saved"
115
  msgstr ""
116
 
117
- #: include/wph.class.php:412
118
  msgid "Cache cleared"
119
  msgstr ""
120
 
121
- #: include/wph.class.php:703
122
- msgid "Unable to create environemnt static file. Is "
123
  msgstr ""
124
 
125
- #: include/wph.class.php:703
126
  msgid "writable"
127
  msgstr ""
128
 
129
- #: include/wph.class.php:703
130
  msgid "will not work correctly, so where turned off."
131
  msgstr ""
132
 
@@ -138,11 +144,11 @@ msgstr ""
138
  msgid "WP Hide & Security Enhancer - Admin"
139
  msgstr ""
140
 
141
- #: modules/module-general.php:63
142
  msgid "General / Html"
143
  msgstr ""
144
 
145
- #: modules/module-general.php:75
146
  msgid "WP Hide & Security Enhancer - General / Html"
147
  msgstr ""
148
 
@@ -163,8 +169,9 @@ msgstr ""
163
  #: modules/components/rewrite-new_include_path.php:19
164
  #: modules/components/rewrite-new_plugin_path.php:19
165
  #: modules/components/rewrite-new_theme_path.php:24
166
- #: modules/components/rewrite-new_theme_path.php:84
167
  #: modules/components/rewrite-new_upload_path.php:19
 
168
  #: modules/components/rewrite-wp_content_path.php:18
169
  msgid "More details can be found at"
170
  msgstr ""
@@ -194,25 +201,27 @@ msgstr ""
194
 
195
  #: modules/components/admin-admin_url.php:38
196
  #: modules/components/admin-new_wp_login_php.php:37
 
197
  #: modules/components/general-headers.php:22
198
  #: modules/components/general-headers.php:39
199
  #: modules/components/general-html.php:21
200
- #: modules/components/general-html.php:38
201
- #: modules/components/general-html.php:55
202
- #: modules/components/general-html.php:72
203
- #: modules/components/general-html.php:89
204
- #: modules/components/general-html.php:106
 
205
  #: modules/components/general-meta.php:22
206
  #: modules/components/general-meta.php:38
207
  #: modules/components/general-meta.php:54
208
  #: modules/components/general-meta.php:70
209
  #: modules/components/general-meta.php:86
210
- #: modules/components/general-meta.php:103
211
- #: modules/components/general-meta.php:120
212
- #: modules/components/general-meta.php:139
213
- #: modules/components/general-meta.php:157
214
- #: modules/components/general-meta.php:173
215
- #: modules/components/general-meta.php:189
216
  #: modules/components/general-oembed.php:22
217
  #: modules/components/general-scripts.php:21
218
  #: modules/components/general-styles.php:21
@@ -229,8 +238,8 @@ msgstr ""
229
  #: modules/components/rewrite-json-rest.php:122
230
  #: modules/components/rewrite-new_include_path.php:34
231
  #: modules/components/rewrite-new_plugin_path.php:35
232
- #: modules/components/rewrite-new_theme_path.php:62
233
- #: modules/components/rewrite-new_theme_path.php:119
234
  #: modules/components/rewrite-new_upload_path.php:35
235
  #: modules/components/rewrite-new_xml-rpc-path.php:34
236
  #: modules/components/rewrite-new_xml-rpc-path.php:51
@@ -242,32 +251,34 @@ msgstr ""
242
  #: modules/components/rewrite-root-files.php:88
243
  #: modules/components/rewrite-root-files.php:105
244
  #: modules/components/rewrite-root-files.php:122
245
- #: modules/components/rewrite-slash.php:21
246
  #: modules/components/rewrite-wp_content_path.php:36
247
  msgid "Yes"
248
  msgstr ""
249
 
250
  #: modules/components/admin-admin_url.php:39
251
  #: modules/components/admin-new_wp_login_php.php:38
 
252
  #: modules/components/general-headers.php:23
253
  #: modules/components/general-headers.php:40
254
  #: modules/components/general-html.php:22
255
- #: modules/components/general-html.php:39
256
- #: modules/components/general-html.php:56
257
- #: modules/components/general-html.php:73
258
- #: modules/components/general-html.php:90
259
- #: modules/components/general-html.php:107
 
260
  #: modules/components/general-meta.php:23
261
  #: modules/components/general-meta.php:39
262
  #: modules/components/general-meta.php:55
263
  #: modules/components/general-meta.php:71
264
  #: modules/components/general-meta.php:87
265
- #: modules/components/general-meta.php:104
266
- #: modules/components/general-meta.php:121
267
- #: modules/components/general-meta.php:140
268
- #: modules/components/general-meta.php:158
269
- #: modules/components/general-meta.php:174
270
- #: modules/components/general-meta.php:190
271
  #: modules/components/general-oembed.php:23
272
  #: modules/components/general-scripts.php:22
273
  #: modules/components/general-styles.php:22
@@ -284,8 +295,8 @@ msgstr ""
284
  #: modules/components/rewrite-json-rest.php:123
285
  #: modules/components/rewrite-new_include_path.php:35
286
  #: modules/components/rewrite-new_plugin_path.php:36
287
- #: modules/components/rewrite-new_theme_path.php:63
288
- #: modules/components/rewrite-new_theme_path.php:120
289
  #: modules/components/rewrite-new_upload_path.php:36
290
  #: modules/components/rewrite-new_xml-rpc-path.php:35
291
  #: modules/components/rewrite-new_xml-rpc-path.php:52
@@ -297,7 +308,7 @@ msgstr ""
297
  #: modules/components/rewrite-root-files.php:89
298
  #: modules/components/rewrite-root-files.php:106
299
  #: modules/components/rewrite-root-files.php:123
300
- #: modules/components/rewrite-slash.php:22
301
  #: modules/components/rewrite-wp_content_path.php:37
302
  msgid "No"
303
  msgstr ""
@@ -341,6 +352,12 @@ msgstr ""
341
  msgid "Block default wp-login.php file from being accesible."
342
  msgstr ""
343
 
 
 
 
 
 
 
344
  #: modules/components/general-headers.php:17
345
  msgid "Remove X-Powered-By Header if being set."
346
  msgstr ""
@@ -362,24 +379,40 @@ msgid ""
362
  msgstr ""
363
 
364
  #: modules/components/general-html.php:33
 
 
 
 
 
 
365
  msgid "Remove general classes from body tag."
366
  msgstr ""
367
 
368
- #: modules/components/general-html.php:50
 
 
 
 
 
 
 
 
 
 
369
  msgid "Remove ID attribute from all menu items."
370
  msgstr ""
371
 
372
- #: modules/components/general-html.php:67
373
  msgid ""
374
  "Remove class attribute from all menu items. Any classes which include a "
375
  "\"current\" prefix or contain \"has-children\" will be preserved."
376
  msgstr ""
377
 
378
- #: modules/components/general-html.php:84
379
  msgid "Remove general classes from post."
380
  msgstr ""
381
 
382
- #: modules/components/general-html.php:101
383
  msgid "Remove general classes from media tags."
384
  msgstr ""
385
 
@@ -394,46 +427,46 @@ msgid ""
394
  msgstr ""
395
 
396
  #: modules/components/general-meta.php:50
397
- msgid "Remove DNS Prefetch meta generated tag."
398
  msgstr ""
399
 
400
  #: modules/components/general-meta.php:66
 
 
 
 
401
  msgid ""
402
  "Remove Resource Hints meta generated tags within head (eg dns-prefetch, "
403
  "preconnect)."
404
  msgstr ""
405
 
406
- #: modules/components/general-meta.php:82
407
  msgid "Remove the wlwmanifest tag within head."
408
  msgstr ""
409
 
410
- #: modules/components/general-meta.php:99
411
- msgid "Remove the feed_links tag within head."
412
- msgstr ""
413
-
414
- #: modules/components/general-meta.php:115
415
  #: modules/components/rewrite-json-rest.php:82
416
  msgid "Disable output the REST API link tag into page header"
417
  msgstr ""
418
 
419
- #: modules/components/general-meta.php:116
420
  #: modules/components/rewrite-json-rest.php:83
421
  msgid "By default a REST API link tag is being append to HTML."
422
  msgstr ""
423
 
424
- #: modules/components/general-meta.php:135
425
  msgid "Remove the rsd_link tag within head."
426
  msgstr ""
427
 
428
- #: modules/components/general-meta.php:153
429
  msgid "Remove the adjacent_posts_rel tag within head."
430
  msgstr ""
431
 
432
- #: modules/components/general-meta.php:169
433
  msgid "Remove profile link meta tag within head."
434
  msgstr ""
435
 
436
- #: modules/components/general-meta.php:185
437
  msgid "Remove canonical link meta tag within head."
438
  msgstr ""
439
 
@@ -537,7 +570,7 @@ msgstr ""
537
 
538
  #: modules/components/rewrite-new_include_path.php:18
539
  #: modules/components/rewrite-new_theme_path.php:23
540
- #: modules/components/rewrite-new_theme_path.php:83
541
  msgid "The default theme path is set to"
542
  msgstr ""
543
 
@@ -594,68 +627,63 @@ msgid "New Style File Path"
594
  msgstr ""
595
 
596
  #: modules/components/rewrite-new_theme_path.php:37
597
- #: modules/components/rewrite-new_theme_path.php:96
598
  msgid "The default theme style file style.css path is set to"
599
  msgstr ""
600
 
601
- #: modules/components/rewrite-new_theme_path.php:38
602
- #: modules/components/rewrite-new_theme_path.php:97
603
- msgid ""
604
- "If style file contain relative URLs it should not include additional path, "
605
- "just the actual filename."
606
- msgstr ""
607
-
608
- #: modules/components/rewrite-new_theme_path.php:38
609
- #: modules/components/rewrite-new_theme_path.php:97
610
- msgid "More details at"
611
- msgstr ""
612
-
613
- #: modules/components/rewrite-new_theme_path.php:41
614
- #: modules/components/rewrite-new_theme_path.php:99
615
  msgid "e.g. custom-style-file.css"
616
  msgstr ""
617
 
618
- #: modules/components/rewrite-new_theme_path.php:51
619
  msgid "Remove description header from Style file"
620
  msgstr ""
621
 
622
- #: modules/components/rewrite-new_theme_path.php:54
623
- #: modules/components/rewrite-new_theme_path.php:112
624
  msgid ""
625
  "Strip out all meta data from style file e.g. Theme Name, Theme URI, Author "
626
  "etc. Those are important information to find out possible theme security "
627
  "breaches."
628
  msgstr ""
629
 
630
- #: modules/components/rewrite-new_theme_path.php:55
631
- #: modules/components/rewrite-new_theme_path.php:113
632
  msgid ""
633
  "This feature may not work if style file url not available on html (being "
634
  "concatenated)."
635
  msgstr ""
636
 
637
- #: modules/components/rewrite-new_theme_path.php:57
638
- #: modules/components/rewrite-new_theme_path.php:115
639
  msgid ""
640
  "This use caching. If active, cache clear is recommended on styles updated."
641
  msgstr ""
642
 
643
- #: modules/components/rewrite-new_theme_path.php:82
644
  msgid "Child - New Theme Path"
645
  msgstr ""
646
 
647
- #: modules/components/rewrite-new_theme_path.php:86
648
  msgid "e.g. my_child_template"
649
  msgstr ""
650
 
651
- #: modules/components/rewrite-new_theme_path.php:95
652
  msgid "Child - New Style File Path"
653
  msgstr ""
654
 
655
- #: modules/components/rewrite-new_theme_path.php:109
656
  msgid "Child - Remove description header from Style file"
657
  msgstr ""
658
 
 
 
 
 
 
 
 
659
  #: modules/components/rewrite-new_upload_path.php:17
660
  msgid "New Uploads Path"
661
  msgstr ""
@@ -792,13 +820,13 @@ msgstr ""
792
  msgid "URL's add Slash"
793
  msgstr ""
794
 
795
- #: modules/components/rewrite-slash.php:17
796
  msgid ""
797
- "Add an end slash to any links without. This disguise any existance uppon a "
798
- "file, folder or a wrong url, they will be all slashed."
799
  msgstr ""
800
 
801
- #: modules/components/rewrite-slash.php:17
802
  msgid ""
803
  "On certain systems this can produce a small lag measured in milliseconds."
804
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
+ "POT-Creation-Date: 2017-09-01 10:55+0200\n"
5
+ "PO-Revision-Date: 2017-09-01 10:55+0200\n"
6
  "Last-Translator: NspCode <contact@nsp-code.com>\n"
7
  "Language-Team: \n"
8
  "MIME-Version: 1.0\n"
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
+ #: conflicts/wp-simple-firewall.php:92
17
  msgid ""
18
  "<b>Conflict notice</b>: The Security Firewall - Login Protection use the "
19
  "Rename WP Login Page functionality which is the same as WP Hide - Admin "
20
  "Login Url change. "
21
  msgstr ""
22
 
23
+ #: include/functions.class.php:229
24
  msgid "Value"
25
  msgstr ""
26
 
27
+ #: include/functions.class.php:229
28
  msgid "set for"
29
  msgstr ""
30
 
31
+ #: include/functions.class.php:229
32
  msgid "already in use for another option."
33
  msgstr ""
34
 
35
+ #: include/functions.class.php:325
36
  msgid ""
37
  "W3 Total Cache Plugin is active, make sure you clear the cache for new "
38
  "changes to apply"
39
  msgstr ""
40
 
41
+ #: include/functions.class.php:329
42
  msgid ""
43
  "WP Super Cache Plugin is active, make sure you clear the cache for new "
44
  "changes to apply"
45
  msgstr ""
46
 
47
+ #: include/functions.class.php:334
48
  msgid ""
49
  "WP Fastest Cache Plugin is active, make sure you clear the cache for new "
50
  "changes to apply"
51
  msgstr ""
52
 
53
+ #: include/functions.class.php:1983
54
  #, php-format
55
  msgid "The %1$s plugin header is deprecated. Use %2$s instead."
56
  msgstr ""
57
 
58
+ #: include/functions.class.php:2068
59
  #, php-format
60
  msgid "By %s."
61
  msgstr ""
62
 
63
+ #: include/functions.class.php:2354
64
  msgid ""
65
  "Help us to improve this plugin by sending any improvement suggestions and "
66
  "reporting any issues at "
67
  msgstr ""
68
 
69
+ #: include/functions.class.php:2355
70
  msgid ""
71
  "Did you find this plugin useful? Please support our work by spread the word "
72
  "about this, or write an article about the plugin in your blog with a link to "
73
  "development site"
74
  msgstr ""
75
 
76
+ #: include/wph.class.php:308
77
  msgid "Are you sure to reset all settings? All options will be removed."
78
  msgstr ""
79
 
80
+ #: include/wph.class.php:344
81
  msgid ""
82
  "Unable to launch WP Hide through mu-plugins/wp-hide-loader.php<br /> Please "
83
  "make sure this location is writable so the plugin create the required file."
84
  msgstr ""
85
 
86
+ #: include/wph.class.php:350
87
  msgid ""
88
  "Permalink is required to be turned ON for WP Hide & Security Enhancer to work"
89
  msgstr ""
90
 
91
+ #: include/wph.class.php:356
92
+ msgid ""
93
+ "<b>WP Hide</b> Unable to idenify server type.<br />No rewrite is being "
94
+ "applied."
95
+ msgstr ""
96
+
97
+ #: include/wph.class.php:367 include/wph.class.php:394
98
  msgid ""
99
  "Unable to write custom rules to your .htaccess. Is this file writable? <br /"
100
  ">No mod is being applied."
101
  msgstr ""
102
 
103
+ #: include/wph.class.php:370 include/wph.class.php:397
104
  msgid ""
105
  "Unable to write custom rules to your web.config. Is this file writable? <br /"
106
  ">No mod is being applied."
107
  msgstr ""
108
 
109
+ #: include/wph.class.php:378
110
  msgid ""
111
  "Unable to create cache folder. Is the wp-content writable? <br />No cache "
112
  "data will be available."
113
  msgstr ""
114
 
115
+ #: include/wph.class.php:383
116
  msgid "All Settings where restored to default"
117
  msgstr ""
118
 
119
+ #: include/wph.class.php:419
120
  msgid "Settings saved"
121
  msgstr ""
122
 
123
+ #: include/wph.class.php:461
124
  msgid "Cache cleared"
125
  msgstr ""
126
 
127
+ #: include/wph.class.php:764
128
+ msgid "Unable to create environment static file. Is "
129
  msgstr ""
130
 
131
+ #: include/wph.class.php:764
132
  msgid "writable"
133
  msgstr ""
134
 
135
+ #: include/wph.class.php:764
136
  msgid "will not work correctly, so where turned off."
137
  msgstr ""
138
 
144
  msgid "WP Hide & Security Enhancer - Admin"
145
  msgstr ""
146
 
147
+ #: modules/module-general.php:66
148
  msgid "General / Html"
149
  msgstr ""
150
 
151
+ #: modules/module-general.php:78
152
  msgid "WP Hide & Security Enhancer - General / Html"
153
  msgstr ""
154
 
169
  #: modules/components/rewrite-new_include_path.php:19
170
  #: modules/components/rewrite-new_plugin_path.php:19
171
  #: modules/components/rewrite-new_theme_path.php:24
172
+ #: modules/components/rewrite-new_theme_path.php:82
173
  #: modules/components/rewrite-new_upload_path.php:19
174
+ #: modules/components/rewrite-slash.php:19
175
  #: modules/components/rewrite-wp_content_path.php:18
176
  msgid "More details can be found at"
177
  msgstr ""
201
 
202
  #: modules/components/admin-admin_url.php:38
203
  #: modules/components/admin-new_wp_login_php.php:37
204
+ #: modules/components/general-feed.php:21
205
  #: modules/components/general-headers.php:22
206
  #: modules/components/general-headers.php:39
207
  #: modules/components/general-html.php:21
208
+ #: modules/components/general-html.php:37
209
+ #: modules/components/general-html.php:52
210
+ #: modules/components/general-html.php:67
211
+ #: modules/components/general-html.php:83
212
+ #: modules/components/general-html.php:98
213
+ #: modules/components/general-html.php:113
214
  #: modules/components/general-meta.php:22
215
  #: modules/components/general-meta.php:38
216
  #: modules/components/general-meta.php:54
217
  #: modules/components/general-meta.php:70
218
  #: modules/components/general-meta.php:86
219
+ #: modules/components/general-meta.php:102
220
+ #: modules/components/general-meta.php:119
221
+ #: modules/components/general-meta.php:138
222
+ #: modules/components/general-meta.php:156
223
+ #: modules/components/general-meta.php:172
224
+ #: modules/components/general-meta.php:188
225
  #: modules/components/general-oembed.php:22
226
  #: modules/components/general-scripts.php:21
227
  #: modules/components/general-styles.php:21
238
  #: modules/components/rewrite-json-rest.php:122
239
  #: modules/components/rewrite-new_include_path.php:34
240
  #: modules/components/rewrite-new_plugin_path.php:35
241
+ #: modules/components/rewrite-new_theme_path.php:60
242
+ #: modules/components/rewrite-new_theme_path.php:116
243
  #: modules/components/rewrite-new_upload_path.php:35
244
  #: modules/components/rewrite-new_xml-rpc-path.php:34
245
  #: modules/components/rewrite-new_xml-rpc-path.php:51
251
  #: modules/components/rewrite-root-files.php:88
252
  #: modules/components/rewrite-root-files.php:105
253
  #: modules/components/rewrite-root-files.php:122
254
+ #: modules/components/rewrite-slash.php:23
255
  #: modules/components/rewrite-wp_content_path.php:36
256
  msgid "Yes"
257
  msgstr ""
258
 
259
  #: modules/components/admin-admin_url.php:39
260
  #: modules/components/admin-new_wp_login_php.php:38
261
+ #: modules/components/general-feed.php:22
262
  #: modules/components/general-headers.php:23
263
  #: modules/components/general-headers.php:40
264
  #: modules/components/general-html.php:22
265
+ #: modules/components/general-html.php:38
266
+ #: modules/components/general-html.php:53
267
+ #: modules/components/general-html.php:68
268
+ #: modules/components/general-html.php:84
269
+ #: modules/components/general-html.php:99
270
+ #: modules/components/general-html.php:114
271
  #: modules/components/general-meta.php:23
272
  #: modules/components/general-meta.php:39
273
  #: modules/components/general-meta.php:55
274
  #: modules/components/general-meta.php:71
275
  #: modules/components/general-meta.php:87
276
+ #: modules/components/general-meta.php:103
277
+ #: modules/components/general-meta.php:120
278
+ #: modules/components/general-meta.php:139
279
+ #: modules/components/general-meta.php:157
280
+ #: modules/components/general-meta.php:173
281
+ #: modules/components/general-meta.php:189
282
  #: modules/components/general-oembed.php:23
283
  #: modules/components/general-scripts.php:22
284
  #: modules/components/general-styles.php:22
295
  #: modules/components/rewrite-json-rest.php:123
296
  #: modules/components/rewrite-new_include_path.php:35
297
  #: modules/components/rewrite-new_plugin_path.php:36
298
+ #: modules/components/rewrite-new_theme_path.php:61
299
+ #: modules/components/rewrite-new_theme_path.php:117
300
  #: modules/components/rewrite-new_upload_path.php:36
301
  #: modules/components/rewrite-new_xml-rpc-path.php:35
302
  #: modules/components/rewrite-new_xml-rpc-path.php:52
308
  #: modules/components/rewrite-root-files.php:89
309
  #: modules/components/rewrite-root-files.php:106
310
  #: modules/components/rewrite-root-files.php:123
311
+ #: modules/components/rewrite-slash.php:24
312
  #: modules/components/rewrite-wp_content_path.php:37
313
  msgid "No"
314
  msgstr ""
352
  msgid "Block default wp-login.php file from being accesible."
353
  msgstr ""
354
 
355
+ #: modules/components/general-feed.php:17
356
+ msgid ""
357
+ "Remove feed|rdf|rss|rss2|atom links within head. Also block such content "
358
+ "functionality."
359
+ msgstr ""
360
+
361
  #: modules/components/general-headers.php:17
362
  msgid "Remove X-Powered-By Header if being set."
363
  msgstr ""
379
  msgstr ""
380
 
381
  #: modules/components/general-html.php:33
382
+ msgid ""
383
+ "Remove all HTML new line carriage which makes all tags to appear on a single "
384
+ "line."
385
+ msgstr ""
386
+
387
+ #: modules/components/general-html.php:49
388
  msgid "Remove general classes from body tag."
389
  msgstr ""
390
 
391
+ #: modules/components/general-html.php:49
392
+ #: modules/components/general-html.php:64
393
+ #: modules/components/general-html.php:79
394
+ #: modules/components/general-html.php:95
395
+ #: modules/components/general-html.php:110
396
+ msgid ""
397
+ "This can produce layout issues with certain themes, if something break this "
398
+ "should be turned off."
399
+ msgstr ""
400
+
401
+ #: modules/components/general-html.php:64
402
  msgid "Remove ID attribute from all menu items."
403
  msgstr ""
404
 
405
+ #: modules/components/general-html.php:79
406
  msgid ""
407
  "Remove class attribute from all menu items. Any classes which include a "
408
  "\"current\" prefix or contain \"has-children\" will be preserved."
409
  msgstr ""
410
 
411
+ #: modules/components/general-html.php:95
412
  msgid "Remove general classes from post."
413
  msgstr ""
414
 
415
+ #: modules/components/general-html.php:110
416
  msgid "Remove general classes from media tags."
417
  msgstr ""
418
 
427
  msgstr ""
428
 
429
  #: modules/components/general-meta.php:50
430
+ msgid "Remove shortlink tags within head."
431
  msgstr ""
432
 
433
  #: modules/components/general-meta.php:66
434
+ msgid "Remove DNS Prefetch meta generated tag."
435
+ msgstr ""
436
+
437
+ #: modules/components/general-meta.php:82
438
  msgid ""
439
  "Remove Resource Hints meta generated tags within head (eg dns-prefetch, "
440
  "preconnect)."
441
  msgstr ""
442
 
443
+ #: modules/components/general-meta.php:98
444
  msgid "Remove the wlwmanifest tag within head."
445
  msgstr ""
446
 
447
+ #: modules/components/general-meta.php:114
 
 
 
 
448
  #: modules/components/rewrite-json-rest.php:82
449
  msgid "Disable output the REST API link tag into page header"
450
  msgstr ""
451
 
452
+ #: modules/components/general-meta.php:115
453
  #: modules/components/rewrite-json-rest.php:83
454
  msgid "By default a REST API link tag is being append to HTML."
455
  msgstr ""
456
 
457
+ #: modules/components/general-meta.php:134
458
  msgid "Remove the rsd_link tag within head."
459
  msgstr ""
460
 
461
+ #: modules/components/general-meta.php:152
462
  msgid "Remove the adjacent_posts_rel tag within head."
463
  msgstr ""
464
 
465
+ #: modules/components/general-meta.php:168
466
  msgid "Remove profile link meta tag within head."
467
  msgstr ""
468
 
469
+ #: modules/components/general-meta.php:184
470
  msgid "Remove canonical link meta tag within head."
471
  msgstr ""
472
 
570
 
571
  #: modules/components/rewrite-new_include_path.php:18
572
  #: modules/components/rewrite-new_theme_path.php:23
573
+ #: modules/components/rewrite-new_theme_path.php:81
574
  msgid "The default theme path is set to"
575
  msgstr ""
576
 
627
  msgstr ""
628
 
629
  #: modules/components/rewrite-new_theme_path.php:37
630
+ #: modules/components/rewrite-new_theme_path.php:94
631
  msgid "The default theme style file style.css path is set to"
632
  msgstr ""
633
 
634
+ #: modules/components/rewrite-new_theme_path.php:39
635
+ #: modules/components/rewrite-new_theme_path.php:96
 
 
 
 
 
 
 
 
 
 
 
 
636
  msgid "e.g. custom-style-file.css"
637
  msgstr ""
638
 
639
+ #: modules/components/rewrite-new_theme_path.php:49
640
  msgid "Remove description header from Style file"
641
  msgstr ""
642
 
643
+ #: modules/components/rewrite-new_theme_path.php:52
644
+ #: modules/components/rewrite-new_theme_path.php:109
645
  msgid ""
646
  "Strip out all meta data from style file e.g. Theme Name, Theme URI, Author "
647
  "etc. Those are important information to find out possible theme security "
648
  "breaches."
649
  msgstr ""
650
 
651
+ #: modules/components/rewrite-new_theme_path.php:53
652
+ #: modules/components/rewrite-new_theme_path.php:110
653
  msgid ""
654
  "This feature may not work if style file url not available on html (being "
655
  "concatenated)."
656
  msgstr ""
657
 
658
+ #: modules/components/rewrite-new_theme_path.php:55
659
+ #: modules/components/rewrite-new_theme_path.php:112
660
  msgid ""
661
  "This use caching. If active, cache clear is recommended on styles updated."
662
  msgstr ""
663
 
664
+ #: modules/components/rewrite-new_theme_path.php:80
665
  msgid "Child - New Theme Path"
666
  msgstr ""
667
 
668
+ #: modules/components/rewrite-new_theme_path.php:84
669
  msgid "e.g. my_child_template"
670
  msgstr ""
671
 
672
+ #: modules/components/rewrite-new_theme_path.php:93
673
  msgid "Child - New Style File Path"
674
  msgstr ""
675
 
676
+ #: modules/components/rewrite-new_theme_path.php:106
677
  msgid "Child - Remove description header from Style file"
678
  msgstr ""
679
 
680
+ #: modules/components/rewrite-new_theme_path.php:765
681
+ msgid ""
682
+ "When changing the Child Theme Path it is recommended to also change the Main "
683
+ "Theme Path to avoid relative paths issues within style files and layout "
684
+ "break."
685
+ msgstr ""
686
+
687
  #: modules/components/rewrite-new_upload_path.php:17
688
  msgid "New Uploads Path"
689
  msgstr ""
820
  msgid "URL's add Slash"
821
  msgstr ""
822
 
823
+ #: modules/components/rewrite-slash.php:18
824
  msgid ""
825
+ "Add an end slash to any links without one. Disguise the existence of files "
826
+ "and folders, they will be all slashed."
827
  msgstr ""
828
 
829
+ #: modules/components/rewrite-slash.php:18
830
  msgid ""
831
  "On certain systems this can produce a small lag measured in milliseconds."
832
  msgstr ""
modules/components/admin-admin_url.php CHANGED
@@ -98,19 +98,14 @@
98
  return $processing_response;
99
 
100
  $admin_url = $this->wph->functions->get_url_path( trailingslashit( site_url() ) . 'wp-admin' );
101
-
102
- $path = '';
103
- if(!empty($this->wph->default_variables['wordpress_directory']))
104
- $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
105
- $path .= trailingslashit( $saved_field_data );
106
 
107
- $rewrite_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) : '';
108
 
109
  if($this->wph->server_htaccess_config === TRUE)
110
  {
111
- $text = "\nRewriteCond %{REQUEST_URI} ". $rewrite_base . $saved_field_data ."$";
112
- $text .= "\nRewriteRule ^(.*)$ ". $rewrite_base . $saved_field_data ."/ [R=301,L]";
113
- $text .= "\nRewriteRule ^" . $path . '(.*) '. $admin_url .'$1 [L,QSA]';
114
  }
115
 
116
  if($this->wph->server_web_config === TRUE)
@@ -118,12 +113,12 @@
118
  <rule name="wph-admin_url1" stopProcessing="true">
119
  <match url="^(.*)$" />
120
  <conditions>
121
- <add input="{REQUEST_URI}" matchType="Pattern" pattern="'. $rewrite_base . $saved_field_data .'$" />
122
  </conditions>
123
- <action type="Redirect" redirectType="Permanent" url="'. $rewrite_base . $saved_field_data .'{R:1}/" />
124
  </rule>
125
  <rule name="wph-admin_url2" stopProcessing="true">
126
- <match url="^'. $path .'(.*)" />
127
  <action type="Rewrite" url="'. $admin_url .'{R:1}" appendQueryString="true" />
128
  </rule>
129
  ';
@@ -241,11 +236,7 @@
241
 
242
  $site_index = $this->wph->functions->get_url_path ( trailingslashit( site_url() ) . 'index.php', TRUE );
243
 
244
- $path = '';
245
- if(!empty($this->wph->default_variables['wordpress_directory']))
246
- $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
247
-
248
- $rewrite_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) : '';
249
 
250
  if($this->wph->server_htaccess_config === TRUE)
251
  {
@@ -261,14 +252,14 @@
261
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
262
  $text .= "RewriteRule ^admin(.+) $site_index?wph-throw-404 [L]\n";
263
 
264
- if(!empty($path))
265
  {
266
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
267
- $text .= "RewriteRule ^".$path."wp-admin(.+) $site_index?wph-throw-404 [L]\n";
268
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
269
- $text .= "RewriteRule ^".$path."dashboard(.+) $site_index?wph-throw-404 [L]\n";
270
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
271
- $text .= "RewriteRule ^".$path."admin(.+) $site_index?wph-throw-404 [L]";
272
  }
273
  }
274
 
@@ -288,19 +279,19 @@
288
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
289
  </rule>
290
  ';
291
- if(!empty($path))
292
  {
293
  $text .= '
294
  <rule name="wph-block_default_admin_url4" stopProcessing="true">
295
- <match url="^'. $path .'wp-admin(.+)" />
296
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
297
  </rule>
298
  <rule name="wph-block_default_admin_url5" stopProcessing="true">
299
- <match url="^'. $path .'dashboard(.+)" />
300
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
301
  </rule>
302
  <rule name="wph-block_default_admin_url6" stopProcessing="true">
303
- <match url="^'. $path .'admin(.+)" />
304
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
305
  </rule>
306
  ';
98
  return $processing_response;
99
 
100
  $admin_url = $this->wph->functions->get_url_path( trailingslashit( site_url() ) . 'wp-admin' );
 
 
 
 
 
101
 
102
+ $rewrite_base = $this->wph->functions->get_rewrite_base( $saved_field_data, FALSE, FALSE );
103
 
104
  if($this->wph->server_htaccess_config === TRUE)
105
  {
106
+ $text = "\nRewriteCond %{REQUEST_URI} ". $rewrite_base ."$";
107
+ $text .= "\nRewriteRule ^(.*)$ ". $rewrite_base ."/ [R=301,L]";
108
+ $text .= "\nRewriteRule ^" . $rewrite_base . '(.*) '. $admin_url .'$1 [L,QSA]';
109
  }
110
 
111
  if($this->wph->server_web_config === TRUE)
113
  <rule name="wph-admin_url1" stopProcessing="true">
114
  <match url="^(.*)$" />
115
  <conditions>
116
+ <add input="{REQUEST_URI}" matchType="Pattern" pattern="'. $rewrite_base .'$" />
117
  </conditions>
118
+ <action type="Redirect" redirectType="Permanent" url="'. $rewrite_base . '{R:1}/" />
119
  </rule>
120
  <rule name="wph-admin_url2" stopProcessing="true">
121
+ <match url="^'. $rewrite_base .'(.*)" />
122
  <action type="Rewrite" url="'. $admin_url .'{R:1}" appendQueryString="true" />
123
  </rule>
124
  ';
236
 
237
  $site_index = $this->wph->functions->get_url_path ( trailingslashit( site_url() ) . 'index.php', TRUE );
238
 
239
+ $rewrite_base = $this->wph->functions->get_rewrite_base( '', FALSE);
 
 
 
 
240
 
241
  if($this->wph->server_htaccess_config === TRUE)
242
  {
252
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
253
  $text .= "RewriteRule ^admin(.+) $site_index?wph-throw-404 [L]\n";
254
 
255
+ if(!empty($rewrite_base))
256
  {
257
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
258
+ $text .= "RewriteRule ^".$rewrite_base."wp-admin(.+) $site_index?wph-throw-404 [L]\n";
259
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
260
+ $text .= "RewriteRule ^".$rewrite_base."dashboard(.+) $site_index?wph-throw-404 [L]\n";
261
  $text .= "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
262
+ $text .= "RewriteRule ^".$rewrite_base."admin(.+) $site_index?wph-throw-404 [L]";
263
  }
264
  }
265
 
279
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
280
  </rule>
281
  ';
282
+ if(!empty($rewrite_base))
283
  {
284
  $text .= '
285
  <rule name="wph-block_default_admin_url4" stopProcessing="true">
286
+ <match url="^'. $rewrite_base .'wp-admin(.+)" />
287
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
288
  </rule>
289
  <rule name="wph-block_default_admin_url5" stopProcessing="true">
290
+ <match url="^'. $rewrite_base .'dashboard(.+)" />
291
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
292
  </rule>
293
  <rule name="wph-block_default_admin_url6" stopProcessing="true">
294
+ <match url="^'. $rewrite_base .'admin(.+)" />
295
  <action type="Rewrite" url="'. $site_index .'?wph-throw-404" />
296
  </rule>
297
  ';
modules/components/admin-new_wp_login_php.php CHANGED
@@ -95,15 +95,18 @@
95
  if(!empty($this->wph->default_variables['wordpress_directory']))
96
  $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
97
  $path .= $saved_field_data;
 
 
 
98
 
99
  if($this->wph->server_htaccess_config === TRUE)
100
- $processing_response['rewrite'] = "\nRewriteRule ^" . $path . '(.*) '. $new_wp_login_php .'$1 [L,QSA]';
101
 
102
  if($this->wph->server_web_config === TRUE)
103
  $processing_response['rewrite'] = '
104
  <rule name="wph-new_wp_login_php" stopProcessing="true">
105
- <match url="^'. $path .'(.*)" />
106
- <action type="Rewrite" url="'. $new_wp_login_php .'{R:1}" appendQueryString="true" />
107
  </rule>
108
  ';
109
 
@@ -131,22 +134,21 @@
131
  if (empty( $new_wp_login_php ))
132
  return FALSE;
133
 
134
- $path = '';
135
- if(!empty($this->wph->default_variables['wordpress_directory']))
136
- $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
137
- $path .= 'wp-login.php';
138
 
139
  if($this->wph->server_htaccess_config === TRUE)
140
  {
141
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
142
- $text .= "RewriteRule ^" . $path ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php?wph-throw-404 [L]";
143
  }
144
 
145
  if($this->wph->server_web_config === TRUE)
146
  $text = '
147
  <rule name="wph-block_default_wp_login_php" stopProcessing="true">
148
- <match url="^'. $path .'" />
149
- <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php?wph-throw-404" />
150
  </rule>
151
  ';
152
 
95
  if(!empty($this->wph->default_variables['wordpress_directory']))
96
  $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
97
  $path .= $saved_field_data;
98
+
99
+ $rewrite_base = $this->wph->functions->get_rewrite_base( $saved_field_data, FALSE, FALSE );
100
+ $rewrite_to = $this->wph->functions->get_rewrite_to_base( $new_wp_login_php, FALSE );
101
 
102
  if($this->wph->server_htaccess_config === TRUE)
103
+ $processing_response['rewrite'] = "\nRewriteRule ^" . $rewrite_base . '(.*) '. $rewrite_to .'$1 [L,QSA]';
104
 
105
  if($this->wph->server_web_config === TRUE)
106
  $processing_response['rewrite'] = '
107
  <rule name="wph-new_wp_login_php" stopProcessing="true">
108
+ <match url="^'. $rewrite_base .'(.*)" />
109
+ <action type="Rewrite" url="'. $rewrite_to .'{R:1}" appendQueryString="true" />
110
  </rule>
111
  ';
112
 
134
  if (empty( $new_wp_login_php ))
135
  return FALSE;
136
 
137
+
138
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'wp-login.php', FALSE, FALSE );
139
+ $rewrite_to = $this->wph->functions->get_rewrite_to_base( 'index.php', TRUE, FALSE );
 
140
 
141
  if($this->wph->server_htaccess_config === TRUE)
142
  {
143
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
144
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $rewrite_to ."?wph-throw-404 [L]";
145
  }
146
 
147
  if($this->wph->server_web_config === TRUE)
148
  $text = '
149
  <rule name="wph-block_default_wp_login_php" stopProcessing="true">
150
+ <match url="^'. $rewrite_base .'" />
151
+ <action type="Rewrite" url="'. $rewrite_to .'?wph-throw-404" />
152
  </rule>
153
  ';
154
 
modules/components/general-html.php CHANGED
@@ -13,7 +13,7 @@
13
  {
14
  $this->module_settings[] = array(
15
  'id' => 'remove_html_comments',
16
- 'label' => 'Remove HTML Comments',
17
  'description' => __('Remove all HTML Comments which usualy specify Plugins Name and Version. Any Internet Explorer conditional tags are preserved.', 'wp-hide-security-enhancer'),
18
 
19
  'input_type' => 'radio',
@@ -27,6 +27,22 @@
27
  'processing_order' => 80
28
  );
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  $this->module_settings[] = array(
31
  'id' => 'clean_body_classes',
32
  'label' => 'Remove general classes from body tag',
@@ -114,7 +130,7 @@
114
  return FALSE;
115
 
116
 
117
- add_filter('wph/ob_start_callback', array($this, 'remove_html_comments'));
118
 
119
  }
120
 
@@ -134,6 +150,30 @@
134
  return $buffer;
135
 
136
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  function _init_clean_body_classes( $saved_field_data )
139
  {
@@ -281,7 +321,7 @@
281
  if(empty($saved_field_data) || $saved_field_data == 'no')
282
  return FALSE;
283
 
284
- add_filter( 'wph/ob_start_callback', array(&$this, 'ob_start_callback_clean_image_classes'));
285
 
286
  }
287
 
13
  {
14
  $this->module_settings[] = array(
15
  'id' => 'remove_html_comments',
16
+ 'label' => 'Remove Comments',
17
  'description' => __('Remove all HTML Comments which usualy specify Plugins Name and Version. Any Internet Explorer conditional tags are preserved.', 'wp-hide-security-enhancer'),
18
 
19
  'input_type' => 'radio',
27
  'processing_order' => 80
28
  );
29
 
30
+ $this->module_settings[] = array(
31
+ 'id' => 'remove_html_new_lines',
32
+ 'label' => 'Remove new line carriage',
33
+ 'description' => __('Remove all HTML new line carriage which makes all tags to appear on a single line.', 'wp-hide-security-enhancer'),
34
+
35
+ 'input_type' => 'radio',
36
+ 'options' => array(
37
+ 'yes' => __('Yes', 'wp-hide-security-enhancer'),
38
+ 'no' => __('No', 'wp-hide-security-enhancer'),
39
+ ),
40
+ 'default_value' => 'no',
41
+
42
+ 'sanitize_type' => array('sanitize_title', 'strtolower'),
43
+ 'processing_order' => 80
44
+ );
45
+
46
  $this->module_settings[] = array(
47
  'id' => 'clean_body_classes',
48
  'label' => 'Remove general classes from body tag',
130
  return FALSE;
131
 
132
 
133
+ add_filter('wp-hide/ob_start_callback', array($this, 'remove_html_comments'));
134
 
135
  }
136
 
150
  return $buffer;
151
 
152
  }
153
+
154
+
155
+ function _init_remove_html_new_lines($saved_field_data)
156
+ {
157
+ if(empty($saved_field_data) || $saved_field_data == 'no')
158
+ return FALSE;
159
+
160
+
161
+ add_filter('wp-hide/ob_start_callback', array($this, 'remove_html_new_lines'));
162
+
163
+ }
164
+
165
+
166
+ function remove_html_new_lines($buffer)
167
+ {
168
+ //do not run when within admin
169
+ if(defined('WP_ADMIN'))
170
+ return $buffer;
171
+
172
+ $buffer = preg_replace( "/\r|\n/", "", $buffer );
173
+
174
+ return $buffer;
175
+
176
+ }
177
 
178
  function _init_clean_body_classes( $saved_field_data )
179
  {
321
  if(empty($saved_field_data) || $saved_field_data == 'no')
322
  return FALSE;
323
 
324
+ add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_clean_image_classes'));
325
 
326
  }
327
 
modules/components/general-meta.php CHANGED
@@ -44,6 +44,22 @@
44
 
45
  );
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  $this->module_settings[] = array(
48
  'id' => 'remove_dns_prefetch',
49
  'label' => 'Remove DNS Prefetch',
@@ -192,7 +208,7 @@
192
  remove_action( 'wp_head', 'wp_generator' );
193
 
194
  //make sure it's being replaced
195
- add_filter( 'wph/ob_start_callback', array(&$this, 'ob_start_callback_remove_generator_meta'));
196
  }
197
 
198
 
@@ -230,7 +246,7 @@
230
  return FALSE;
231
 
232
  //remove other generator links
233
- add_filter( 'wph/ob_start_callback', array(&$this, 'ob_start_callback_remove_other_generator_meta'));
234
  }
235
 
236
 
@@ -242,7 +258,7 @@
242
  return $buffer;
243
 
244
  }
245
-
246
  function remove_other_generator_meta_preg_replace_callback( $matches )
247
  {
248
  $found = isset($matches[0]) ? $matches[0] : '';
@@ -256,8 +272,41 @@
256
 
257
  return $found;
258
  }
259
-
260
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
 
262
  function _init_remove_dns_prefetch( $saved_field_data )
263
  {
@@ -265,7 +314,7 @@
265
  if(empty($saved_field_data) || $saved_field_data == 'no')
266
  return FALSE;
267
 
268
- add_filter( 'wph/ob_start_callback', array(&$this, 'ob_start_callback_remove_dns_prefetch'));
269
 
270
  }
271
 
@@ -355,7 +404,7 @@
355
  return FALSE;
356
 
357
 
358
- add_filter('wph/ob_start_callback', array($this, 'remove_profile_tag'));
359
 
360
  }
361
 
@@ -399,7 +448,7 @@
399
  add_action( 'auth_redirect', array(&$this, 'remove_wp_admin_canonical_url'));
400
 
401
  //make sure is removed if placed by other plugins
402
- add_filter('wph/ob_start_callback', array($this, 'remove_canonical_tag'));
403
  }
404
 
405
  function remove_wp_admin_canonical_url()
44
 
45
  );
46
 
47
+ $this->module_settings[] = array(
48
+ 'id' => 'remove_shortlink_meta',
49
+ 'label' => 'Remove Shortlink Meta',
50
+ 'description' => __('Remove shortlink tags within head.', 'wp-hide-security-enhancer'),
51
+
52
+ 'input_type' => 'radio',
53
+ 'options' => array(
54
+ 'yes' => __('Yes', 'wp-hide-security-enhancer'),
55
+ 'no' => __('No', 'wp-hide-security-enhancer'),
56
+ ),
57
+ 'default_value' => 'no',
58
+
59
+ 'sanitize_type' => array('sanitize_title', 'strtolower')
60
+
61
+ );
62
+
63
  $this->module_settings[] = array(
64
  'id' => 'remove_dns_prefetch',
65
  'label' => 'Remove DNS Prefetch',
208
  remove_action( 'wp_head', 'wp_generator' );
209
 
210
  //make sure it's being replaced
211
+ add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_remove_generator_meta'));
212
  }
213
 
214
 
246
  return FALSE;
247
 
248
  //remove other generator links
249
+ add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_remove_other_generator_meta'));
250
  }
251
 
252
 
258
  return $buffer;
259
 
260
  }
261
+
262
  function remove_other_generator_meta_preg_replace_callback( $matches )
263
  {
264
  $found = isset($matches[0]) ? $matches[0] : '';
272
 
273
  return $found;
274
  }
275
+
276
+
277
+ function _init_remove_shortlink_meta($saved_field_data)
278
+ {
279
+ if(empty($saved_field_data) || $saved_field_data == 'no')
280
+ return FALSE;
281
+
282
+ //remove other generator links
283
+ add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_remove_shortlink_meta'));
284
+ }
285
+
286
+ function ob_start_callback_remove_shortlink_meta( $buffer )
287
+ {
288
+
289
+ $result = preg_match_all('/(<link([^>]+)rel=("|\')shortlink("|\')([^>]+)?\/?>)/im', $buffer, $founds);
290
+
291
+ if(!isset($founds[0]) || count($founds[0]) < 1)
292
+ return $buffer;
293
+
294
+ if(count($founds[0]) > 0)
295
+ {
296
+ foreach ($founds[0] as $found)
297
+ {
298
+ if(empty($found))
299
+ continue;
300
+
301
+ $buffer = str_replace($found, "", $buffer);
302
+
303
+ }
304
+
305
+ }
306
+
307
+ return $buffer;
308
+
309
+ }
310
 
311
  function _init_remove_dns_prefetch( $saved_field_data )
312
  {
314
  if(empty($saved_field_data) || $saved_field_data == 'no')
315
  return FALSE;
316
 
317
+ add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_remove_dns_prefetch'));
318
 
319
  }
320
 
404
  return FALSE;
405
 
406
 
407
+ add_filter('wp-hide/ob_start_callback', array($this, 'remove_profile_tag'));
408
 
409
  }
410
 
448
  add_action( 'auth_redirect', array(&$this, 'remove_wp_admin_canonical_url'));
449
 
450
  //make sure is removed if placed by other plugins
451
+ add_filter('wp-hide/ob_start_callback', array($this, 'remove_canonical_tag'));
452
  }
453
 
454
  function remove_wp_admin_canonical_url()
modules/components/general-styles.php CHANGED
@@ -94,7 +94,7 @@
94
  if(is_admin())
95
  return FALSE;
96
 
97
- add_filter( 'wph/ob_start_callback', array(&$this, 'ob_start_callback_remove_id'));
98
 
99
  }
100
 
94
  if(is_admin())
95
  return FALSE;
96
 
97
+ add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_remove_id'));
98
 
99
  }
100
 
modules/components/rewrite-comments.php CHANGED
@@ -98,19 +98,19 @@
98
  $new_wp_comments_post = ltrim(rtrim($this->wph->functions->get_module_item_setting('new_wp_comments_post'), "/"), "/");
99
  if (empty( $new_wp_comments_post ))
100
  return FALSE;
101
-
102
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'wp-comments-post.php' : 'wp-comments-post.php';
103
 
104
  if($this->wph->server_htaccess_config === TRUE)
105
  {
106
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
107
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
108
  }
109
 
110
  if($this->wph->server_web_config === TRUE)
111
  $text = '
112
  <rule name="wph-block_wp_comments_post_url" stopProcessing="true">
113
- <match url="^' . $rewrite_file_base . '" />
114
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
115
  </rule>
116
  ';
98
  $new_wp_comments_post = ltrim(rtrim($this->wph->functions->get_module_item_setting('new_wp_comments_post'), "/"), "/");
99
  if (empty( $new_wp_comments_post ))
100
  return FALSE;
101
+
102
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'wp-comments-post.php', FALSE, FALSE );
103
 
104
  if($this->wph->server_htaccess_config === TRUE)
105
  {
106
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
107
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
108
  }
109
 
110
  if($this->wph->server_web_config === TRUE)
111
  $text = '
112
  <rule name="wph-block_wp_comments_post_url" stopProcessing="true">
113
+ <match url="^' . $rewrite_base . '" />
114
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
115
  </rule>
116
  ';
modules/components/rewrite-new_include_path.php CHANGED
@@ -50,12 +50,6 @@
50
  if(empty($saved_field_data))
51
  return FALSE;
52
 
53
- //disable the filters to allow other plugins to use default urls (e.g. W3 cache).
54
- //add_filter('includes_url', array( $this, 'includes_url' ), 999, 2);
55
- //add_filter('script_loader_src', array( $this, 'script_loader_src' ), 999, 2);
56
- //add_filter('style_loader_src', array( $this, 'style_loader_src' ), 999, 2);
57
- //add_filter('wp_default_scripts', array($this, 'wp_default_scripts' ), 999);
58
-
59
  //add default plugin path replacement
60
  $new_include_path = $this->wph->functions->untrailingslashit_all( $this->wph->functions->get_module_item_setting('new_include_path') );
61
  $new_include_path = trailingslashit( site_url() ) . untrailingslashit( $new_include_path );
@@ -78,14 +72,17 @@
78
  $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
79
  $path .= trailingslashit( $saved_field_data );
80
 
 
 
 
81
  if($this->wph->server_htaccess_config === TRUE)
82
- $processing_response['rewrite'] = "\nRewriteRule ^" . $path . '(.+) '. $include_path .'$1 [L,QSA]';
83
 
84
  if($this->wph->server_web_config === TRUE)
85
  $processing_response['rewrite'] = '
86
  <rule name="wph-new_include_path" stopProcessing="true">
87
- <match url="^'. $path .'(.+)" />
88
- <action type="Rewrite" url="'. $include_path .'{R:1}" appendQueryString="true" />
89
  </rule>
90
  ';
91
 
50
  if(empty($saved_field_data))
51
  return FALSE;
52
 
 
 
 
 
 
 
53
  //add default plugin path replacement
54
  $new_include_path = $this->wph->functions->untrailingslashit_all( $this->wph->functions->get_module_item_setting('new_include_path') );
55
  $new_include_path = trailingslashit( site_url() ) . untrailingslashit( $new_include_path );
72
  $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
73
  $path .= trailingslashit( $saved_field_data );
74
 
75
+ $rewrite_base = $this->wph->functions->get_rewrite_base( $saved_field_data, FALSE );
76
+ $rewrite_to = $this->wph->functions->get_rewrite_to_base( $include_path );
77
+
78
  if($this->wph->server_htaccess_config === TRUE)
79
+ $processing_response['rewrite'] = "\nRewriteRule ^" . $rewrite_base . '(.+) '. $rewrite_to .'$1 [L,QSA]';
80
 
81
  if($this->wph->server_web_config === TRUE)
82
  $processing_response['rewrite'] = '
83
  <rule name="wph-new_include_path" stopProcessing="true">
84
+ <match url="^'. $rewrite_base .'(.+)" />
85
+ <action type="Rewrite" url="'. $rewrite_to .'{R:1}" appendQueryString="true" />
86
  </rule>
87
  ';
88
 
modules/components/rewrite-new_theme_path.php CHANGED
@@ -49,7 +49,7 @@
49
  'label' => __('Remove description header from Style file', 'wp-hide-security-enhancer'),
50
  'description' =>
51
  array(
52
- __('Strip out all meta data from style file e.g. Theme Name, Theme URI, Author etc. Those are important information to find out possible theme security breaches.', 'wp-hide-security-enhancer'),
53
  __('This feature may not work if style file url not available on html (being concatenated).', 'wp-hide-security-enhancer'),
54
  '',
55
  '<div class="notice-error"><div class="dashicons dashicons-warning important" alt="f534">warning</div> <span class="important">' . __('This use caching. If active, cache clear is recommended on styles updated.', 'wp-hide-security-enhancer') .'</span> <a href="admin.php?page=wp-hide&wph_cache_clear=true" class="button action">Cache Clear</a></div>'
@@ -122,8 +122,12 @@
122
  'processing_order' => 3
123
 
124
  );
 
 
125
 
126
  }
 
 
127
 
128
  return $this->module_settings;
129
  }
@@ -739,6 +743,47 @@
739
  $this->wph->functions->cache_clear();
740
 
741
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
742
 
743
 
744
  }
49
  'label' => __('Remove description header from Style file', 'wp-hide-security-enhancer'),
50
  'description' =>
51
  array(
52
+ __('Strip out all meta data from style file e.g. Theme Name, Theme URI, Author etc. Those are important information to find out possible theme security breaches.', 'wp-hide-security-enhancer') . '<br />' .
53
  __('This feature may not work if style file url not available on html (being concatenated).', 'wp-hide-security-enhancer'),
54
  '',
55
  '<div class="notice-error"><div class="dashicons dashicons-warning important" alt="f534">warning</div> <span class="important">' . __('This use caching. If active, cache clear is recommended on styles updated.', 'wp-hide-security-enhancer') .'</span> <a href="admin.php?page=wp-hide&wph_cache_clear=true" class="button action">Cache Clear</a></div>'
122
  'processing_order' => 3
123
 
124
  );
125
+
126
+ add_filter('wp-hide/interface/process', array($this, 'interface_process'), 10, 3);
127
 
128
  }
129
+
130
+ add_action('wph/settings_changed', array($this, 'settings_changed'), 10, 2);
131
 
132
  return $this->module_settings;
133
  }
743
  $this->wph->functions->cache_clear();
744
 
745
  }
746
+
747
+
748
+ /**
749
+ * Ensure specific processing execution when saving the options
750
+ *
751
+ * @param mixed $errors
752
+ * @param mixed $process_interface_save_errors
753
+ * @param mixed $_settings_
754
+ * @param mixed $module_settings
755
+ */
756
+ function interface_process( $errors, $_settings_, $module_settings )
757
+ {
758
+ global $process_interface_save_errors;
759
+
760
+ //when using the 'Child - New Theme Path' trigger a warning tha the 'New Theme Path' should be changed to, to avoid relative paths issues within child styles
761
+
762
+ if($_settings_['new_theme_path'] == '' && $_settings_['new_theme_child_path'] != '')
763
+ {
764
+ $process_interface_save_errors[] = array( 'type' => 'warning',
765
+ 'message' => __('When changing the Child Theme Path it is recommended to also change the Main Theme Path to avoid relative paths issues within style files and layout break.', 'wp-hide-security-enhancer')
766
+ );
767
+ }
768
+
769
+ return $errors;
770
+ }
771
+
772
+
773
+ /**
774
+ * Flush the style cache when this area being changed
775
+ *
776
+ * @param mixed $screen_slug
777
+ * @param mixed $tab_slug
778
+ */
779
+ function settings_changed( $screen_slug, $tab_slug )
780
+ {
781
+ if( strtolower( $this->get_component_title() ) != $tab_slug )
782
+ return;
783
+
784
+ $this->wph->functions->cache_clear();
785
+
786
+ }
787
 
788
 
789
  }
modules/components/rewrite-new_upload_path.php CHANGED
@@ -103,15 +103,18 @@
103
  if(!empty($this->wph->default_variables['wordpress_directory']))
104
  $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
105
  $path .= trailingslashit( $saved_field_data );
 
 
 
106
 
107
  if($this->wph->server_htaccess_config === TRUE)
108
- $processing_response['rewrite'] = "\nRewriteRule ^" . $path . '(.+) '. $uploads_path .'$1 [L,QSA]';
109
 
110
  if($this->wph->server_web_config === TRUE)
111
  $processing_response['rewrite'] = '
112
  <rule name="wph-new_upload_path" stopProcessing="true">
113
- <match url="^'. $path .'(.+)" />
114
- <action type="Rewrite" url="'. $uploads_path .'{R:1}" appendQueryString="true" />
115
  </rule>
116
  ';
117
 
@@ -159,22 +162,19 @@
159
  $default_upload_url = untrailingslashit ( $wp_upload_dir['baseurl'] );
160
  $default_upload_url = str_replace( site_url(), "", $default_upload_url);
161
  $default_upload_url = ltrim(rtrim($default_upload_url, "/"), "/");
162
-
163
- $path = '';
164
- if(!empty($this->wph->default_variables['wordpress_directory']))
165
- $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
166
- $path .= $default_upload_url;
167
 
168
  if($this->wph->server_htaccess_config === TRUE)
169
  {
170
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
171
- $text .= "RewriteRule ^". $path ."(.+) ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
172
  }
173
 
174
  if($this->wph->server_web_config === TRUE)
175
  $text = '
176
  <rule name="wph-block_upload_url" stopProcessing="true">
177
- <match url="^'. $path .'(.+)" />
178
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
179
  </rule>
180
  ';
103
  if(!empty($this->wph->default_variables['wordpress_directory']))
104
  $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
105
  $path .= trailingslashit( $saved_field_data );
106
+
107
+ $rewrite_base = $this->wph->functions->get_rewrite_base( $saved_field_data, FALSE );
108
+ $rewrite_to = $this->wph->functions->get_rewrite_to_base( $uploads_path );
109
 
110
  if($this->wph->server_htaccess_config === TRUE)
111
+ $processing_response['rewrite'] = "\nRewriteRule ^" . $rewrite_base . '(.+) '. $rewrite_to .'$1 [L,QSA]';
112
 
113
  if($this->wph->server_web_config === TRUE)
114
  $processing_response['rewrite'] = '
115
  <rule name="wph-new_upload_path" stopProcessing="true">
116
+ <match url="^'. $rewrite_base .'(.+)" />
117
+ <action type="Rewrite" url="'. $rewrite_to .'{R:1}" appendQueryString="true" />
118
  </rule>
119
  ';
120
 
162
  $default_upload_url = untrailingslashit ( $wp_upload_dir['baseurl'] );
163
  $default_upload_url = str_replace( site_url(), "", $default_upload_url);
164
  $default_upload_url = ltrim(rtrim($default_upload_url, "/"), "/");
165
+
166
+ $rewrite_base = $this->wph->functions->get_rewrite_base( $default_upload_url, FALSE );
 
 
 
167
 
168
  if($this->wph->server_htaccess_config === TRUE)
169
  {
170
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
171
+ $text .= "RewriteRule ^". $rewrite_base ."(.+) ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
172
  }
173
 
174
  if($this->wph->server_web_config === TRUE)
175
  $text = '
176
  <rule name="wph-block_upload_url" stopProcessing="true">
177
+ <match url="^'. $rewrite_base .'(.+)" />
178
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
179
  </rule>
180
  ';
modules/components/rewrite-new_xml-rpc-path.php CHANGED
@@ -162,7 +162,7 @@
162
  return FALSE;
163
 
164
 
165
- add_filter('wph/ob_start_callback', array($this, 'remove_xml_rpc_tag'));
166
 
167
  }
168
 
162
  return FALSE;
163
 
164
 
165
+ add_filter('wp-hide/ob_start_callback', array($this, 'remove_xml_rpc_tag'));
166
 
167
  }
168
 
modules/components/rewrite-root-files.php CHANGED
@@ -141,18 +141,18 @@
141
  if(empty($saved_field_data) || $saved_field_data == 'no')
142
  return FALSE;
143
 
144
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'license.txt' : 'license.txt';
145
 
146
  if($this->wph->server_htaccess_config === TRUE)
147
  {
148
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
149
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
150
  }
151
 
152
  if($this->wph->server_web_config === TRUE)
153
  $text = '
154
  <rule name="wph-block_license_txt" stopProcessing="true">
155
- <match url="^' . $rewrite_file_base . '" />
156
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
157
  </rule>
158
  ';
@@ -171,18 +171,18 @@
171
  if(empty($saved_field_data) || $saved_field_data == 'no')
172
  return FALSE;
173
 
174
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'readme.html' : 'readme.html';
175
 
176
  if($this->wph->server_htaccess_config === TRUE)
177
  {
178
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
179
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
180
  }
181
 
182
  if($this->wph->server_web_config === TRUE)
183
  $text = '
184
  <rule name="wph-block_readme_html" stopProcessing="true">
185
- <match url="^' . $rewrite_file_base . '" />
186
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
187
  </rule>
188
  ';
@@ -200,19 +200,19 @@
200
 
201
  if(empty($saved_field_data) || $saved_field_data == 'no')
202
  return FALSE;
203
-
204
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'wp-activate.php' : 'wp-activate.php';
205
 
206
  if($this->wph->server_htaccess_config === TRUE)
207
  {
208
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
209
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
210
  }
211
 
212
  if($this->wph->server_web_config === TRUE)
213
  $text = '
214
  <rule name="wph-block_wp_activate_php" stopProcessing="true">
215
- <match url="^' . $rewrite_file_base . '" />
216
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
217
  </rule>
218
  ';
@@ -232,18 +232,18 @@
232
  if(empty($saved_field_data) || $saved_field_data == 'no')
233
  return FALSE;
234
 
235
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'wp-cron.php' : 'wp-cron.php';
236
 
237
  if($this->wph->server_htaccess_config === TRUE)
238
  {
239
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
240
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
241
  }
242
 
243
  if($this->wph->server_web_config === TRUE)
244
  $text = '
245
  <rule name="wph-block_wp_cron_php" stopProcessing="true">
246
- <match url="^' . $rewrite_file_base . '" />
247
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
248
  </rule>
249
  ';
@@ -262,18 +262,18 @@
262
  if(empty($saved_field_data) || $saved_field_data == 'no')
263
  return $processing_response;
264
 
265
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'wp-signup.php' : 'wp-signup.php';
266
 
267
  if($this->wph->server_htaccess_config === TRUE)
268
  {
269
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
270
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
271
  }
272
 
273
  if($this->wph->server_web_config === TRUE)
274
  $text = '
275
  <rule name="wph-block_default_wp_signup_php" stopProcessing="true">
276
- <match url="^' . $rewrite_file_base . '" />
277
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
278
  </rule>
279
  ';
@@ -291,18 +291,18 @@
291
  if(empty($saved_field_data) || $saved_field_data == 'no')
292
  return $processing_response;
293
 
294
- $rewrite_file_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) . 'wp-register.php' : 'wp-register.php';
295
 
296
  if($this->wph->server_htaccess_config === TRUE)
297
  {
298
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
299
- $text .= "RewriteRule ^" . $rewrite_file_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php?wph-throw-404 [L]";
300
  }
301
 
302
  if($this->wph->server_web_config === TRUE)
303
  $text = '
304
  <rule name="wph-block_default_wp_register_php" stopProcessing="true">
305
- <match url="^wp-register.php" />
306
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php?wph-throw-404" />
307
  </rule>
308
  ';
@@ -319,19 +319,20 @@
319
  if(empty($saved_field_data) || $saved_field_data == 'no')
320
  return $processing_response;
321
 
322
- $rewrite_base = !empty($this->wph->default_variables['wordpress_directory']) ? trailingslashit( $this->wph->default_variables['wordpress_directory'] ) : '';
 
323
 
324
  if($this->wph->server_htaccess_config === TRUE)
325
  {
326
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
327
  $text .= "RewriteCond %{REQUEST_FILENAME} -f\n";
328
 
329
- $text .= "RewriteCond %{REQUEST_FILENAME} !wp-activate.php [NC]\n";
330
- $text .= "RewriteCond %{REQUEST_FILENAME} !wp-cron.php [NC]\n";
331
- $text .= "RewriteCond %{REQUEST_FILENAME} !wp-signup.php [NC]\n";
332
- $text .= "RewriteCond %{REQUEST_FILENAME} !wp-register.php [NC]\n";
333
- $text .= "RewriteCond %{REQUEST_FILENAME} !wp-comments-post.php [NC]\n";
334
- $text .= "RewriteCond %{REQUEST_FILENAME} !wp-login.php [NC]\n";
335
 
336
  $text .= "RewriteRule ^" . $rewrite_base . "wp-([a-z-])+.php ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
337
  }
141
  if(empty($saved_field_data) || $saved_field_data == 'no')
142
  return FALSE;
143
 
144
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'license.txt', FALSE, FALSE );
145
 
146
  if($this->wph->server_htaccess_config === TRUE)
147
  {
148
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
149
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
150
  }
151
 
152
  if($this->wph->server_web_config === TRUE)
153
  $text = '
154
  <rule name="wph-block_license_txt" stopProcessing="true">
155
+ <match url="^' . $rewrite_base . '" />
156
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
157
  </rule>
158
  ';
171
  if(empty($saved_field_data) || $saved_field_data == 'no')
172
  return FALSE;
173
 
174
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'readme.html', FALSE, FALSE );
175
 
176
  if($this->wph->server_htaccess_config === TRUE)
177
  {
178
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
179
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
180
  }
181
 
182
  if($this->wph->server_web_config === TRUE)
183
  $text = '
184
  <rule name="wph-block_readme_html" stopProcessing="true">
185
+ <match url="^' . $rewrite_base . '" />
186
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
187
  </rule>
188
  ';
200
 
201
  if(empty($saved_field_data) || $saved_field_data == 'no')
202
  return FALSE;
203
+
204
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'wp-activate.php', FALSE, FALSE );
205
 
206
  if($this->wph->server_htaccess_config === TRUE)
207
  {
208
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
209
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
210
  }
211
 
212
  if($this->wph->server_web_config === TRUE)
213
  $text = '
214
  <rule name="wph-block_wp_activate_php" stopProcessing="true">
215
+ <match url="^' . $rewrite_base . '" />
216
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
217
  </rule>
218
  ';
232
  if(empty($saved_field_data) || $saved_field_data == 'no')
233
  return FALSE;
234
 
235
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'wp-cron.php', FALSE, FALSE );
236
 
237
  if($this->wph->server_htaccess_config === TRUE)
238
  {
239
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
240
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
241
  }
242
 
243
  if($this->wph->server_web_config === TRUE)
244
  $text = '
245
  <rule name="wph-block_wp_cron_php" stopProcessing="true">
246
+ <match url="^' . $rewrite_base . '" />
247
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
248
  </rule>
249
  ';
262
  if(empty($saved_field_data) || $saved_field_data == 'no')
263
  return $processing_response;
264
 
265
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'wp-signup.php', FALSE, FALSE );
266
 
267
  if($this->wph->server_htaccess_config === TRUE)
268
  {
269
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
270
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
271
  }
272
 
273
  if($this->wph->server_web_config === TRUE)
274
  $text = '
275
  <rule name="wph-block_default_wp_signup_php" stopProcessing="true">
276
+ <match url="^' . $rewrite_base . '" />
277
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php" />
278
  </rule>
279
  ';
291
  if(empty($saved_field_data) || $saved_field_data == 'no')
292
  return $processing_response;
293
 
294
+ $rewrite_base = $this->wph->functions->get_rewrite_base( 'wp-register.php', FALSE, FALSE );
295
 
296
  if($this->wph->server_htaccess_config === TRUE)
297
  {
298
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
299
+ $text .= "RewriteRule ^" . $rewrite_base ." ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php?wph-throw-404 [L]";
300
  }
301
 
302
  if($this->wph->server_web_config === TRUE)
303
  $text = '
304
  <rule name="wph-block_default_wp_register_php" stopProcessing="true">
305
+ <match url="^'. $rewrite_base .'" />
306
  <action type="Rewrite" url="'. $this->wph->default_variables['site_wordpress_relative_path'] .'index.php?wph-throw-404" />
307
  </rule>
308
  ';
319
  if(empty($saved_field_data) || $saved_field_data == 'no')
320
  return $processing_response;
321
 
322
+ $rewrite_conditional = $this->wph->functions->get_rewrite_base( '', FALSE );
323
+ $rewrite_base = $this->wph->functions->get_rewrite_base( '', FALSE);
324
 
325
  if($this->wph->server_htaccess_config === TRUE)
326
  {
327
  $text = "RewriteCond %{ENV:REDIRECT_STATUS} ^$\n";
328
  $text .= "RewriteCond %{REQUEST_FILENAME} -f\n";
329
 
330
+ $text .= "RewriteCond %{REQUEST_FILENAME} !".$rewrite_conditional."wp-activate.php [NC]\n";
331
+ $text .= "RewriteCond %{REQUEST_FILENAME} !".$rewrite_conditional."wp-cron.php [NC]\n";
332
+ $text .= "RewriteCond %{REQUEST_FILENAME} !".$rewrite_conditional."wp-signup.php [NC]\n";
333
+ $text .= "RewriteCond %{REQUEST_FILENAME} !".$rewrite_conditional."wp-register.php [NC]\n";
334
+ $text .= "RewriteCond %{REQUEST_FILENAME} !".$rewrite_conditional."wp-comments-post.php [NC]\n";
335
+ $text .= "RewriteCond %{REQUEST_FILENAME} !".$rewrite_conditional."wp-login.php [NC]\n";
336
 
337
  $text .= "RewriteRule ^" . $rewrite_base . "wp-([a-z-])+.php ". $this->wph->default_variables['site_wordpress_relative_path'] ."index.php [L]";
338
  }
modules/components/rewrite-wp_content_path.php CHANGED
@@ -70,20 +70,18 @@
70
 
71
 
72
  $content_path = $this->wph->functions->get_url_path( trailingslashit( WP_CONTENT_URL ));
73
-
74
- $path = '';
75
- if(!empty($this->wph->default_variables['wordpress_directory']))
76
- $path = trailingslashit($this->wph->default_variables['wordpress_directory']);
77
- $path .= trailingslashit( $saved_field_data );
78
 
79
  if($this->wph->server_htaccess_config === TRUE)
80
- $processing_response['rewrite'] = "\nRewriteRule ^" . $path . '(.+) '. $content_path .'$1 [L,QSA]';
81
 
82
  if($this->wph->server_web_config === TRUE)
83
  $processing_response['rewrite'] = '
84
  <rule name="wph-new_content_path" stopProcessing="true">
85
- <match url="^'. $path .'(.+)" />
86
- <action type="Rewrite" url="'. $content_path .'{R:1}" appendQueryString="true" />
87
  </rule>
88
  ';
89
 
70
 
71
 
72
  $content_path = $this->wph->functions->get_url_path( trailingslashit( WP_CONTENT_URL ));
73
+
74
+ $rewrite_base = $this->wph->functions->get_rewrite_base( $saved_field_data, FALSE);
75
+ $rewrite_to = $this->wph->functions->get_rewrite_to_base( $content_path );
 
 
76
 
77
  if($this->wph->server_htaccess_config === TRUE)
78
+ $processing_response['rewrite'] = "\nRewriteRule ^" . $rewrite_base . '(.+) '. $rewrite_to .'$1 [L,QSA]';
79
 
80
  if($this->wph->server_web_config === TRUE)
81
  $processing_response['rewrite'] = '
82
  <rule name="wph-new_content_path" stopProcessing="true">
83
+ <match url="^'. $rewrite_base .'(.+)" />
84
+ <action type="Rewrite" url="'. $rewrite_to .'{R:1}" appendQueryString="true" />
85
  </rule>
86
  ';
87
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: nsp-code, tdgu
3
  Donate link: http://www.nsp-code.com/donate.php
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: 4.8.1
7
- Stable tag: 1.4.5.6
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.
@@ -144,6 +144,7 @@ Since version 1.2 Change individual plugin urls which make them unrecognizable,
144
 
145
  * Remove WordPress Generator Meta
146
  * Remove Other Generator Meta
 
147
  * Remove DNS Prefetch
148
  * Remove Resource Hints
149
  * Remove wlwmanifest Meta
@@ -154,6 +155,10 @@ Since version 1.2 Change individual plugin urls which make them unrecognizable,
154
  * Remove profile link
155
  * Remove canonical link
156
 
 
 
 
 
157
  **General / Robots.txt**
158
 
159
  * Disable admin url within Robots.txt
@@ -184,6 +189,7 @@ Since version 1.2 Change individual plugin urls which make them unrecognizable,
184
  **General / Html > HTML**
185
 
186
  * Remove HTML Comments
 
187
  * Remove general classes from body tag
188
  * Remove ID from Menu items
189
  * Remove class from Menu items
@@ -243,6 +249,17 @@ Please get in touch with us and we'll do our best to include it for a next versi
243
 
244
  == Changelog ==
245
 
 
 
 
 
 
 
 
 
 
 
 
246
  = 1.4.5.6 =
247
  * Prevent the wp-register.php redirect to new login page when using block
248
  * Prepare plugin for Composer package
3
  Donate link: http://www.nsp-code.com/donate.php
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: 4.8.2
7
+ Stable tag: 1.4.6.5
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.
144
 
145
  * Remove WordPress Generator Meta
146
  * Remove Other Generator Meta
147
+ * Remove Shortlink Meta
148
  * Remove DNS Prefetch
149
  * Remove Resource Hints
150
  * Remove wlwmanifest Meta
155
  * Remove profile link
156
  * Remove canonical link
157
 
158
+ **General / Feed**
159
+
160
+ * Remove feed|rdf|rss|rss2|atom links
161
+
162
  **General / Robots.txt**
163
 
164
  * Disable admin url within Robots.txt
189
  **General / Html > HTML**
190
 
191
  * Remove HTML Comments
192
+ * Remove new line carriage
193
  * Remove general classes from body tag
194
  * Remove ID from Menu items
195
  * Remove class from Menu items
249
 
250
  == Changelog ==
251
 
252
+ = 1.4.6.5 =
253
+ * Fixed hardcoded wp-register.php within rewrite - root files component
254
+ * Updated components to rewrite_base / rewrite_to system
255
+ * Improved components: Rewrite - WP Includes, Rewrite - WP Content, Rewrite - Plugins, Rewrite - Uploads, Rewrite - Comments, Rewrite - Root Files, Admin - wp-login.php, Admin - Admin Url
256
+ * Typo fix environemnt to environment
257
+ * New Component - Remove Shortlink Meta
258
+ * New Component - Remove new line carriage
259
+ * Apply relative paths change on styles only if main theme / child theme rewrite slug is not empty
260
+ * Improved interface errors and warnings transient structure
261
+ * Use ABSPATH and Environemnt data to create file path for file processing, instead just ABSPATH, for better compatibility
262
+
263
  = 1.4.5.6 =
264
  * Prevent the wp-register.php redirect to new login page when using block
265
  * Prepare plugin for Composer package
router/class.file-processor.php CHANGED
@@ -23,8 +23,12 @@
23
  $this->file_path = $file_path;
24
  $this->replacement_path = $replacement_path;
25
 
 
 
 
 
26
  //append doc root to path
27
- $this->full_file_path = ABSPATH . ltrim($this->file_path, '\/');
28
  $this->full_file_path = str_replace( '\\', '/', $this->full_file_path);
29
 
30
  //check if file exists
@@ -35,9 +39,7 @@
35
  $pathinfo = pathinfo($this->full_file_path);
36
  if(!isset($pathinfo['extension']) || !in_array(strtolower($pathinfo['extension']), $this->allowed_file_type))
37
  die();
38
-
39
-
40
- $this->load_environment();
41
  $this->define_wp_constants();
42
 
43
  //check if the file is in allowed path
@@ -152,12 +154,14 @@
152
  if(isset($this->environment->theme))
153
  {
154
  $var_theme = $this->environment->theme;
155
- $file_data = str_replace('../' . $var_theme->folder_name .'/', '../' . $var_theme->mapped_name .'/', $file_data);
 
156
  }
157
  if(isset($this->environment->child_theme))
158
  {
159
  $var_theme = $this->environment->child_theme;
160
- $file_data = str_replace('../' . $var_theme->folder_name .'/', '../' . $var_theme->mapped_name .'/', $file_data);
 
161
  }
162
 
163
  $this->push_file_to_cache( $file_data );
23
  $this->file_path = $file_path;
24
  $this->replacement_path = $replacement_path;
25
 
26
+ $this->load_environment();
27
+
28
+ $normalize_abspath = str_replace( '\\', '/', ABSPATH);
29
+
30
  //append doc root to path
31
+ $this->full_file_path = str_replace( ltrim( $this->environment->site_wordpress_relative_path , '\/'), "", $normalize_abspath) . ltrim($this->file_path, '\/');
32
  $this->full_file_path = str_replace( '\\', '/', $this->full_file_path);
33
 
34
  //check if file exists
39
  $pathinfo = pathinfo($this->full_file_path);
40
  if(!isset($pathinfo['extension']) || !in_array(strtolower($pathinfo['extension']), $this->allowed_file_type))
41
  die();
42
+
 
 
43
  $this->define_wp_constants();
44
 
45
  //check if the file is in allowed path
154
  if(isset($this->environment->theme))
155
  {
156
  $var_theme = $this->environment->theme;
157
+ if( $var_theme->folder_name != '' && $var_theme->mapped_name != '' )
158
+ $file_data = str_replace('../' . $var_theme->folder_name .'/', '../' . $var_theme->mapped_name .'/', $file_data);
159
  }
160
  if(isset($this->environment->child_theme))
161
  {
162
  $var_theme = $this->environment->child_theme;
163
+ if( $var_theme->folder_name != '' && $var_theme->mapped_name != '' )
164
+ $file_data = str_replace('../' . $var_theme->folder_name .'/', '../' . $var_theme->mapped_name .'/', $file_data);
165
  }
166
 
167
  $this->push_file_to_cache( $file_data );
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.4.5.6
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.4.6.5
9
  Text Domain: wp-hide-security-enhancer
10
  Domain Path: /languages/
11
  */