Version Description
(22/08/2011) = * Fix: fixed daily archives on categories, authors and tags (thank you AlZuwaga). * Confirmed compatibility with WP 3.2.1.
Download this release
Release Info
Developer | dardna |
Plugin | WP htaccess Control |
Version | 2.5.6 |
Comparing to | |
See all releases |
Code changes from version 2.5.5 to 2.5.6
- readme.txt +5 -1
- wp-htaccess-control.php +34 -10
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://dardna.com/wp-htaccess-control
|
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=s4mancha%40gmail%2ecom&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest
|
6 |
Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives
|
7 |
Requires at least: 2.7
|
8 |
-
Tested up to: 3.1
|
9 |
Stable tag: 2.5.5
|
10 |
|
11 |
Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
|
@@ -72,6 +72,10 @@ Search redirection is based on Mark Jaquith's **Nice Search** but extended so th
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
75 |
= 2.5.5 (27/06/2011) =
|
76 |
* *Fix:* fixed search pagination using custom search base; (better regex should be put in place or maybe go for an alternative solution).
|
77 |
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=s4mancha%40gmail%2ecom&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest
|
6 |
Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives
|
7 |
Requires at least: 2.7
|
8 |
+
Tested up to: 3.2.1
|
9 |
Stable tag: 2.5.5
|
10 |
|
11 |
Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 2.5.6 (22/08/2011) =
|
76 |
+
* *Fix:* fixed daily archives on categories, authors and tags (thank you AlZuwaga).
|
77 |
+
* Confirmed compatibility with WP 3.2.1.
|
78 |
+
|
79 |
= 2.5.5 (27/06/2011) =
|
80 |
* *Fix:* fixed search pagination using custom search base; (better regex should be put in place or maybe go for an alternative solution).
|
81 |
|
wp-htaccess-control.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
/*
|
3 |
Plugin Name: WP htaccess Control
|
4 |
Plugin URI: http://dardna.com/wp-htaccess-control
|
5 |
Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
|
6 |
-
Version: 2.5.
|
7 |
Author: António Andrade
|
8 |
Author URI: http://dardna.com
|
9 |
*/
|
@@ -163,38 +163,62 @@ if (!class_exists("WPhtc")) {
|
|
163 |
elseif ($category->parent != 0 ){
|
164 |
$category_nicename = urldecode(get_category_parents( $category->parent, false, '/', true )) . $category_nicename;
|
165 |
}
|
166 |
-
$new_rules = array(
|
|
|
167 |
'('.$category_nicename.')/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
|
|
168 |
'('.$category_nicename.')/([0-9]{4})/([0-9]{2})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
169 |
-
'('.$category_nicename.')/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]'
|
|
|
|
|
|
|
|
|
170 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
171 |
}
|
172 |
}
|
173 |
# else
|
174 |
else {
|
175 |
$category_base = (get_option('category_base')!='')?get_option('category_base'):'category';
|
176 |
-
$new_rules = array(
|
|
|
177 |
$category_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
|
|
178 |
$category_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
179 |
-
$category_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]'
|
|
|
|
|
|
|
|
|
180 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
181 |
}
|
182 |
}
|
183 |
# Author Archives
|
184 |
if(isset($WPhtc_data['author_archives'])){
|
185 |
$author_base = ($WPhtc_data['cap']!='')?$WPhtc_data['cap']:'author';
|
186 |
-
$new_rules = array(
|
|
|
187 |
$author_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
|
|
188 |
$author_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
189 |
-
$author_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]'
|
|
|
|
|
|
|
|
|
190 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
191 |
}
|
192 |
# Tag Archives
|
193 |
if(isset($WPhtc_data['tag_archives'])){
|
194 |
-
$new_rules = array(
|
|
|
195 |
'tag/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
|
|
196 |
'tag/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
197 |
-
'tag/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]'
|
|
|
|
|
|
|
|
|
198 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
199 |
}
|
200 |
# Custom Pagination; Custom Author Permalink
|
1 |
+
<?php
|
2 |
/*
|
3 |
Plugin Name: WP htaccess Control
|
4 |
Plugin URI: http://dardna.com/wp-htaccess-control
|
5 |
Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
|
6 |
+
Version: 2.5.6
|
7 |
Author: António Andrade
|
8 |
Author URI: http://dardna.com
|
9 |
*/
|
163 |
elseif ($category->parent != 0 ){
|
164 |
$category_nicename = urldecode(get_category_parents( $category->parent, false, '/', true )) . $category_nicename;
|
165 |
}
|
166 |
+
$new_rules = array(
|
167 |
+
'('.$category_nicename.')/([0-9]{4})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]',
|
168 |
'('.$category_nicename.')/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
169 |
+
|
170 |
'('.$category_nicename.')/([0-9]{4})/([0-9]{2})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
171 |
+
'('.$category_nicename.')/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]',
|
172 |
+
|
173 |
+
'('.$category_nicename.')/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]',
|
174 |
+
'('.$category_nicename.')/([0-9]{4})/([0-9]{2})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]');
|
175 |
+
|
176 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
177 |
}
|
178 |
}
|
179 |
# else
|
180 |
else {
|
181 |
$category_base = (get_option('category_base')!='')?get_option('category_base'):'category';
|
182 |
+
$new_rules = array(
|
183 |
+
$category_base.'/([^/]+)/([0-9]{4})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]',
|
184 |
$category_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
185 |
+
|
186 |
$category_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
187 |
+
$category_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]',
|
188 |
+
|
189 |
+
$category_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]',
|
190 |
+
$category_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]');
|
191 |
+
|
192 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
193 |
}
|
194 |
}
|
195 |
# Author Archives
|
196 |
if(isset($WPhtc_data['author_archives'])){
|
197 |
$author_base = ($WPhtc_data['cap']!='')?$WPhtc_data['cap']:'author';
|
198 |
+
$new_rules = array(
|
199 |
+
$author_base.'/([^/]+)/([0-9]{4})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]',
|
200 |
$author_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
201 |
+
|
202 |
$author_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
203 |
+
$author_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]',
|
204 |
+
|
205 |
+
$author_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]',
|
206 |
+
$author_base.'/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]');
|
207 |
+
|
208 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
209 |
}
|
210 |
# Tag Archives
|
211 |
if(isset($WPhtc_data['tag_archives'])){
|
212 |
+
$new_rules = array(
|
213 |
+
'tag/([^/]+)/([0-9]{4})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]',
|
214 |
'tag/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&paged=$matches[3]',
|
215 |
+
|
216 |
'tag/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
|
217 |
+
'tag/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]',
|
218 |
+
|
219 |
+
'tag/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]',
|
220 |
+
'tag/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&monthnum=$matches[3]&monthnum=$matches[4]&paged=$matches[5]');
|
221 |
+
|
222 |
$rewrite_rules = $new_rules + $rewrite_rules;
|
223 |
}
|
224 |
# Custom Pagination; Custom Author Permalink
|