Changeset 427161
- Timestamp:
- 08/22/2011 03:23:16 PM (15 years ago)
- Location:
- wp-htaccess-control/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-htaccess-control.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-htaccess-control/trunk/readme.txt
r402270 r427161 6 6 Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives 7 7 Requires at least: 2.7 8 Tested up to: 3. 1.38 Tested up to: 3.2.1 9 9 Stable tag: 2.5.5 10 10 … … 73 73 == Changelog == 74 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 75 79 = 2.5.5 (27/06/2011) = 76 80 * *Fix:* fixed search pagination using custom search base; (better regex should be put in place or maybe go for an alternative solution). -
wp-htaccess-control/trunk/wp-htaccess-control.php
r402270 r427161 1 <?php1 <?php 2 2 /* 3 3 Plugin Name: WP htaccess Control 4 4 Plugin URI: http://dardna.com/wp-htaccess-control 5 5 Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress. 6 Version: 2.5. 56 Version: 2.5.6 7 7 Author: António Andrade 8 8 Author URI: http://dardna.com … … 164 164 $category_nicename = urldecode(get_category_parents( $category->parent, false, '/', true )) . $category_nicename; 165 165 } 166 $new_rules = array( '('.$category_nicename.')/([0-9]{4})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]', 166 $new_rules = array( 167 '('.$category_nicename.')/([0-9]{4})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]', 167 168 '('.$category_nicename.')/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]', 169 168 170 '('.$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]'); 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 170 176 $rewrite_rules = $new_rules + $rewrite_rules; 171 177 } … … 174 180 else { 175 181 $category_base = (get_option('category_base')!='')?get_option('category_base'):'category'; 176 $new_rules = array( $category_base.'/([^/]+)/([0-9]{4})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]', 182 $new_rules = array( 183 $category_base.'/([^/]+)/([0-9]{4})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]', 177 184 $category_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]', 185 178 186 $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]'); 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 180 192 $rewrite_rules = $new_rules + $rewrite_rules; 181 193 } … … 184 196 if(isset($WPhtc_data['author_archives'])){ 185 197 $author_base = ($WPhtc_data['cap']!='')?$WPhtc_data['cap']:'author'; 186 $new_rules = array( $author_base.'/([^/]+)/([0-9]{4})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]', 198 $new_rules = array( 199 $author_base.'/([^/]+)/([0-9]{4})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]', 187 200 $author_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&paged=$matches[3]', 201 188 202 $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]'); 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 190 208 $rewrite_rules = $new_rules + $rewrite_rules; 191 209 } 192 210 # Tag Archives 193 211 if(isset($WPhtc_data['tag_archives'])){ 194 $new_rules = array( 'tag/([^/]+)/([0-9]{4})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]', 212 $new_rules = array( 213 'tag/([^/]+)/([0-9]{4})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]', 195 214 'tag/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&paged=$matches[3]', 215 196 216 '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]'); 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 198 222 $rewrite_rules = $new_rules + $rewrite_rules; 199 223 }
Note: See TracChangeset
for help on using the changeset viewer.