WP htaccess Control - Version 2.2.3

Version Description

(26/03/2011) = * Fix: Still fixing 2.2 canonical bug.

Download this release

Release Info

Developer dardna
Plugin Icon wp plugin WP htaccess Control
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

Files changed (2) hide show
  1. readme.txt +3 -0
  2. wp-htaccess-control.php +4 -3
readme.txt CHANGED
@@ -70,6 +70,9 @@ Removal of the category base is based on iDope's **WP No Category Base** but ext
70
 
71
  == Changelog ==
72
 
 
 
 
73
  = 2.2.2 (26/03/2011) =
74
  * *Fix:* 2.2 canonical bug fix resulted in errors which sould now be fixed.
75
 
70
 
71
  == Changelog ==
72
 
73
+ = 2.2.3 (26/03/2011) =
74
+ * *Fix:* Still fixing 2.2 canonical bug.
75
+
76
  = 2.2.2 (26/03/2011) =
77
  * *Fix:* 2.2 canonical bug fix resulted in errors which sould now be fixed.
78
 
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: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
6
- Version: 2.2.2
7
  Author: António Andrade
8
  Author URI: http://dardna.com
9
  */
@@ -68,8 +68,9 @@ if (!class_exists("WPhtc")) {
68
  }
69
  # Disable canonical redirection on urls using custom pagination permalink
70
  function wphtc_filter_redirect_canonical($requested_url){
 
71
  $WPhtc_data=get_option('WPhtc_data');
72
- if(isset($WPhtc_data['cpp'])&&$WPhtc_data['cpp']!=''&&get_query_var('paged') > 1&&strpos($requested_url,urlencode($WPhtc_data['cpp']))){
73
  return false;
74
  }
75
  else{
@@ -547,7 +548,7 @@ if (isset($WPhtc)) {
547
  add_filter('rewrite_rules_array',array($WPhtc,'wphtc_filter_rewrite_rules'));
548
  add_filter('author_link',array($WPhtc,'wphtc_filter_author_link'));
549
  add_filter('get_pagenum_link',array($WPhtc,'wphtc_filter_get_pagenum_link'));
550
- add_filter('redirect_canonical',array($WPhtc,'wphtc_filter_redirect_canonical'),10,4);
551
  add_action('admin_menu', array($WPhtc,'configure_menu'));
552
  add_action('sm_buildmap',array($WPhtc,'set_sm'));
553
  add_action('init', array($WPhtc,'wphtc_init'));
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.2.3
7
  Author: António Andrade
8
  Author URI: http://dardna.com
9
  */
68
  }
69
  # Disable canonical redirection on urls using custom pagination permalink
70
  function wphtc_filter_redirect_canonical($requested_url){
71
+ global $wp;
72
  $WPhtc_data=get_option('WPhtc_data');
73
+ if(isset($WPhtc_data['cpp'])&&$WPhtc_data['cpp']!=''&&get_query_var('paged') > 1&&preg_match("/".urlencode($WPhtc_data['cpp'])."/",$wp->request)){
74
  return false;
75
  }
76
  else{
548
  add_filter('rewrite_rules_array',array($WPhtc,'wphtc_filter_rewrite_rules'));
549
  add_filter('author_link',array($WPhtc,'wphtc_filter_author_link'));
550
  add_filter('get_pagenum_link',array($WPhtc,'wphtc_filter_get_pagenum_link'));
551
+ add_filter('redirect_canonical',array($WPhtc,'wphtc_filter_redirect_canonical'),10,10);
552
  add_action('admin_menu', array($WPhtc,'configure_menu'));
553
  add_action('sm_buildmap',array($WPhtc,'set_sm'));
554
  add_action('init', array($WPhtc,'wphtc_init'));