WP htaccess Control - Version 1.5.1

Version Description

(01/05/2010) = * Fix: stripped slashes on custom htaccess (thank you Aleksey for the report); * Fix: regex correction for custom pagination permalink (link from page two to the first page would still point to second page); * Fix: (removed references to "hta_mr").

Download this release

Release Info

Developer andrad
Plugin Icon wp plugin WP htaccess Control
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5 to 1.5.1

readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link:
6
  Tags: permalinks, permalink, author, htaccess, rewrite, redirect
7
  Requires at least: 2.7
8
  Tested up to: 2.9.2
9
- Stable tag: 1.5
10
 
11
  Provides an interface to add custom htaccess rules to the htaccess file generated by Wordpress and customisation of the Author Permalink Base and of Paginated Permalinks.
12
 
@@ -52,6 +52,11 @@ Suggestions are of course very welcome and please report any bugs found!
52
  1. Administration page (as of v.1.5)
53
 
54
  == Changelog ==
 
 
 
 
 
55
  = 1.5 (25/03/2010) =
56
  * Feature: customization of the pagination permalinks;
57
  * Feature: "mod_gzip" and "mod_deflate".
6
  Tags: permalinks, permalink, author, htaccess, rewrite, redirect
7
  Requires at least: 2.7
8
  Tested up to: 2.9.2
9
+ Stable tag: 1.5.1
10
 
11
  Provides an interface to add custom htaccess rules to the htaccess file generated by Wordpress and customisation of the Author Permalink Base and of Paginated Permalinks.
12
 
52
  1. Administration page (as of v.1.5)
53
 
54
  == Changelog ==
55
+ = 1.5.1 (01/05/2010) =
56
+ * Fix: stripped slashes on custom htaccess (thank you Aleksey for the report);
57
+ * Fix: regex correction for custom pagination permalink (link from page two to the first page would still point to second page);
58
+ * Fix: (removed references to "hta_mr").
59
+
60
  = 1.5 (25/03/2010) =
61
  * Feature: customization of the pagination permalinks;
62
  * Feature: "mod_gzip" and "mod_deflate".
wp-htaccess-control-ui.php CHANGED
@@ -77,11 +77,9 @@ $WPhtc_data=get_option('WPhtc_data');
77
  <table class="form-table wphtc-inputs">
78
  <tr valign="top">
79
  <td>
80
- <textarea name="WPhtc_hta" style="width:100%;" rows="5"><?php
81
- echo $WPhtc_data['hta'];
82
- if($WPhtc_data['hta_mr']!=""){
83
- echo "\n<IfModule mod_rewrite.c>\nRewriteEngine On\n".$WPhtc_data['hta_mr']."\n</IfModule>";
84
- }?></textarea>
85
  </td>
86
  <td style="width:50%;">
87
  <p class="description"><?php _e('This rules will be printed before any Wordpress rules.', 'wp-htaccess-control'); ?></p>
77
  <table class="form-table wphtc-inputs">
78
  <tr valign="top">
79
  <td>
80
+ <textarea name="WPhtc_hta" style="width:100%;" rows="5">
81
+ <?php echo stripslashes($WPhtc_data['hta']); ?>
82
+ </textarea>
 
 
83
  </td>
84
  <td style="width:50%;">
85
  <p class="description"><?php _e('This rules will be printed before any Wordpress rules.', 'wp-htaccess-control'); ?></p>
wp-htaccess-control.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP htaccess Control
4
  Plugin URI: http://dardna.com/wp-htaccess-control
5
  Description: Provides an interface to add custom htaccess rules to the htaccess file generated by wordpress. Also provides customisation of the Author Permalink Base and of Paginated Permalinks.
6
- Version: 1.5
7
  Author: António Andrade
8
  Author URI: http://dardna.com
9
  */
@@ -38,7 +38,7 @@ if (!class_exists("WPhtc")) {
38
  function wphtc_filter_get_pagenum_link($result){
39
  $WPhtc_data=get_option('WPhtc_data');
40
  if(isset($WPhtc_data['cpp'])&&$WPhtc_data['cpp']!=''){
41
- $result=preg_replace("/".$WPhtc_data['cpp']."\/[0-9]+\//","",$result);
42
  $result=str_replace("page",$WPhtc_data['cpp'],$result);
43
  }
44
  return $result;
@@ -129,7 +129,7 @@ if (!class_exists("WPhtc")) {
129
  $WPhtc_data=get_option('WPhtc_data');
130
  if($WPhtc_data['hta']){
131
  $new_rules.="\n# WPhtc: Begin Custom htaccess\n";
132
- $new_rules.=$WPhtc_data['hta']."\n";
133
  $new_rules.="# WPhtc: End Custom htaccess\n";
134
  }
135
  # htaccess suggestions
@@ -220,11 +220,6 @@ if (!class_exists("WPhtc")) {
220
  $new_rules.="Header append Vary User-Agent env=!dont-vary\n";
221
  $new_rules.="</IfModule>\n";
222
  }
223
- // DEPRECATE LATER (mod_rewrite)
224
- if($WPhtc_data['hta_mr']!=''){
225
- $insert="\n\n# WPhtc: Begin Custom htaccess\n".$WPhtc_data['hta_mr']."\n# WPhtc: End Custom htaccess\n";
226
- $new_rules.=str_replace("RewriteEngine On","RewriteEngine On".$insert,$rules);
227
- }
228
  else{
229
  $new_rules.="\n".$rules;
230
  }
@@ -282,9 +277,6 @@ if (!class_exists("WPhtc")) {
282
  }
283
  # get Custom Htaccess
284
  $WPhtc_data['hta']=$_POST['WPhtc_hta'];
285
- // DEPRECATING
286
- //$WPhtc_data['hta_mr']=$_POST['WPhtc_hta_mr'];
287
- unset($WPhtc_data['hta_mr']);
288
  # get Custom Author Permalink
289
  $WPhtc_data['cap']=$_POST['WPhtc_cap'];
290
  # get Custom Pagination Permalink
3
  Plugin Name: WP htaccess Control
4
  Plugin URI: http://dardna.com/wp-htaccess-control
5
  Description: Provides an interface to add custom htaccess rules to the htaccess file generated by wordpress. Also provides customisation of the Author Permalink Base and of Paginated Permalinks.
6
+ Version: 1.5.1
7
  Author: António Andrade
8
  Author URI: http://dardna.com
9
  */
38
  function wphtc_filter_get_pagenum_link($result){
39
  $WPhtc_data=get_option('WPhtc_data');
40
  if(isset($WPhtc_data['cpp'])&&$WPhtc_data['cpp']!=''){
41
+ $result=preg_replace("/".$WPhtc_data['cpp']."\/[0-9][\/]?/","",$result);
42
  $result=str_replace("page",$WPhtc_data['cpp'],$result);
43
  }
44
  return $result;
129
  $WPhtc_data=get_option('WPhtc_data');
130
  if($WPhtc_data['hta']){
131
  $new_rules.="\n# WPhtc: Begin Custom htaccess\n";
132
+ $new_rules.=stripslashes($WPhtc_data['hta'])."\n";
133
  $new_rules.="# WPhtc: End Custom htaccess\n";
134
  }
135
  # htaccess suggestions
220
  $new_rules.="Header append Vary User-Agent env=!dont-vary\n";
221
  $new_rules.="</IfModule>\n";
222
  }
 
 
 
 
 
223
  else{
224
  $new_rules.="\n".$rules;
225
  }
277
  }
278
  # get Custom Htaccess
279
  $WPhtc_data['hta']=$_POST['WPhtc_hta'];
 
 
 
280
  # get Custom Author Permalink
281
  $WPhtc_data['cap']=$_POST['WPhtc_cap'];
282
  # get Custom Pagination Permalink