Plugin Directory

Changeset 427161


Ignore:
Timestamp:
08/22/2011 03:23:16 PM (15 years ago)
Author:
dardna
Message:
  • *Fix:* fixed daily archives on categories, authors and tags (thank you AlZuwaga).
  • Confirmed compatibility with WP 3.2.1.
Location:
wp-htaccess-control/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-htaccess-control/trunk/readme.txt

    r402270 r427161  
    66Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives
    77Requires at least: 2.7
    8 Tested up to: 3.1.3
     8Tested up to: 3.2.1
    99Stable tag: 2.5.5
    1010
     
    7373== Changelog ==
    7474
     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
    7579= 2.5.5 (27/06/2011) =
    7680* *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 <?php
     1<?php
    22/*
    33Plugin Name: WP htaccess Control
    44Plugin URI: http://dardna.com/wp-htaccess-control
    55Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
    6 Version: 2.5.5
     6Version: 2.5.6
    77Author: António Andrade
    88Author URI: http://dardna.com
     
    164164                            $category_nicename = urldecode(get_category_parents( $category->parent, false, '/', true )) . $category_nicename;
    165165                            }
    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]',
    167168                                        '('.$category_nicename.')/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
     169                                       
    168170                                        '('.$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                                       
    170176                        $rewrite_rules = $new_rules + $rewrite_rules;
    171177                        }
     
    174180                else {
    175181                    $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]',
    177184                                        $category_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
     185                                       
    178186                                        $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                                       
    180192                    $rewrite_rules = $new_rules + $rewrite_rules;
    181193                    }
     
    184196            if(isset($WPhtc_data['author_archives'])){
    185197                $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]',
    187200                                    $author_base.'/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
     201                                   
    188202                                    $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                                   
    190208                $rewrite_rules = $new_rules + $rewrite_rules;
    191209                }
    192210            # Tag Archives
    193211            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]',
    195214                                    'tag/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&year=$matches[2]&paged=$matches[3]',
     215                                   
    196216                                    '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                                   
    198222                $rewrite_rules = $new_rules + $rewrite_rules;
    199223                }
Note: See TracChangeset for help on using the changeset viewer.