Version Description
- fixing error on wphtc_cap's preg_replace commited on 1.1.2 (thank you mattcav!);
- fixing php warning on update without htaccess rules;
Download this release
Release Info
Developer | andrad |
Plugin | WP htaccess Control |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- readme.txt +5 -1
- wp-htaccess-control-gui.php +4 -2
- wp-htaccess-control.php +5 -3
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link:
|
|
6 |
Tags: permalinks, author, htaccess
|
7 |
Requires at least: 2.7
|
8 |
Tested up to: 2.8
|
9 |
-
Stable tag: 1.1.
|
10 |
|
11 |
Provides an interface to add custom htaccess rules to the htaccess file generated by Wordpress. It also includes Custom Author Permalink.
|
12 |
|
@@ -38,6 +38,10 @@ Provides an interface to add custom htaccess rules to the htaccess file generate
|
|
38 |
|
39 |
== Changelog ==
|
40 |
|
|
|
|
|
|
|
|
|
41 |
= 1.1.2 =
|
42 |
* No longer creating empty option array on install or reset (globally better option array handling);
|
43 |
* Confirmed compatibility with WP 2.8
|
6 |
Tags: permalinks, author, htaccess
|
7 |
Requires at least: 2.7
|
8 |
Tested up to: 2.8
|
9 |
+
Stable tag: 1.1.3
|
10 |
|
11 |
Provides an interface to add custom htaccess rules to the htaccess file generated by Wordpress. It also includes Custom Author Permalink.
|
12 |
|
38 |
|
39 |
== Changelog ==
|
40 |
|
41 |
+
= 1.1.3 =
|
42 |
+
* fixing error on wphtc_cap's preg_replace commited on 1.1.2 (thank you mattcav!);
|
43 |
+
* fixing php warning on update without htaccess rules;
|
44 |
+
|
45 |
= 1.1.2 =
|
46 |
* No longer creating empty option array on install or reset (globally better option array handling);
|
47 |
* Confirmed compatibility with WP 2.8
|
wp-htaccess-control-gui.php
CHANGED
@@ -25,8 +25,10 @@ if(isset($action)){
|
|
25 |
if(count($WPhtc_data['pats'])>1 && $WPhtc_data['pats'][0]==''){
|
26 |
unset($WPhtc_data['pats'][0],$WPhtc_data['subs'][0]);
|
27 |
}
|
28 |
-
$WPhtc_data['pats']
|
29 |
-
|
|
|
|
|
30 |
$WPhtc_data['cap']=$_POST['WPhtc_cap'];
|
31 |
update_option('WPhtc_data',$WPhtc_data);
|
32 |
global $wp_rewrite;
|
25 |
if(count($WPhtc_data['pats'])>1 && $WPhtc_data['pats'][0]==''){
|
26 |
unset($WPhtc_data['pats'][0],$WPhtc_data['subs'][0]);
|
27 |
}
|
28 |
+
if(is_array($WPhtc_data['pats'])&&is_array($WPhtc_data['subs'])){
|
29 |
+
$WPhtc_data['pats']=array_values($WPhtc_data['pats']);
|
30 |
+
$WPhtc_data['subs']=array_values($WPhtc_data['subs']);
|
31 |
+
}
|
32 |
$WPhtc_data['cap']=$_POST['WPhtc_cap'];
|
33 |
update_option('WPhtc_data',$WPhtc_data);
|
34 |
global $wp_rewrite;
|
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 includes an improved and much more stable version of Custom Author Permalink
|
6 |
-
Version: 1.1.
|
7 |
Author: dardna
|
8 |
Author URI: http://dardna.com
|
9 |
*/
|
@@ -26,7 +26,8 @@ Author URI: http://dardna.com
|
|
26 |
*/
|
27 |
/*
|
28 |
|
29 |
-
1.1.
|
|
|
30 |
1.1.1 - fixing screenshot mistake;
|
31 |
1.1 - separated gui, improved management and gui;
|
32 |
1.0.1 - added GNU license;
|
@@ -42,7 +43,8 @@ if (!class_exists("WPhtc")) {
|
|
42 |
function wphtc_cap($rules){
|
43 |
$WPhtc_data=get_option('WPhtc_data');
|
44 |
if(isset($WPhtc_data['cap']) && $WPhtc_data['cap']!=''){
|
45 |
-
|
|
|
46 |
}
|
47 |
return $rules;
|
48 |
}
|
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 includes an improved and much more stable version of Custom Author Permalink
|
6 |
+
Version: 1.1.3
|
7 |
Author: dardna
|
8 |
Author URI: http://dardna.com
|
9 |
*/
|
26 |
*/
|
27 |
/*
|
28 |
|
29 |
+
1.1.3 - fixing error on wphtc_cap's preg_replace commited on 1.1.2, fixing php warning on update without htaccess rules;
|
30 |
+
1.1.2 - no longer creating empty option array on install or reset (globally better option array handling), confirmed compatibility with WP 2.8, some work on the gui to-do;
|
31 |
1.1.1 - fixing screenshot mistake;
|
32 |
1.1 - separated gui, improved management and gui;
|
33 |
1.0.1 - added GNU license;
|
43 |
function wphtc_cap($rules){
|
44 |
$WPhtc_data=get_option('WPhtc_data');
|
45 |
if(isset($WPhtc_data['cap']) && $WPhtc_data['cap']!=''){
|
46 |
+
//$rules=unserialize(preg_replace('!s:(\d+):"(.*?)";!se', '"s:".strlen("$2").":\"$2\";"',str_replace('author/',$WPhtc_data['cap'].'/',serialize($rules))));
|
47 |
+
$rules=unserialize(preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'",str_replace('author/',$WPhtc_data['cap'].'/',serialize($rules))));
|
48 |
}
|
49 |
return $rules;
|
50 |
}
|