Changeset 595971
- Timestamp:
- 09/07/2012 02:54:26 PM (14 years ago)
- Location:
- root-relative-urls/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
sb_root_relative_urls.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
root-relative-urls/trunk/readme.txt
r595485 r595971 109 109 == Changelog == 110 110 111 = 1.6 = 112 * Bug fix: I really wish php < 5.3 would die - fixed incompatible funciton reference. 113 111 114 = 1.5 = 112 115 * Bug fix: Fixed an infinite redirect problem caused by a core bug in WordPress - http://core.trac.wordpress.org/ticket/21824 -
root-relative-urls/trunk/sb_root_relative_urls.php
r595485 r595971 9 9 Author: Marcus E. Pope, marcuspope 10 10 Author URI: http://www.marcuspope.com 11 Version: 1. 511 Version: 1.6 12 12 13 13 Copyright 2011 Marcus E. Pope (email : me@marcuspope.com) … … 153 153 } 154 154 155 static function fix_canonical_redirect($redirect, $requested) { 156 //Fixes infinite redirect loop caused by WP Core bug: http://core.trac.wordpress.org/ticket/21824 157 if (MP_WP_Root_Relative_URLS::proper_root_relative_url($redirect) == 158 MP_WP_Root_Relative_URLS::proper_root_relative_url($requested)) { 159 return false; 160 } 161 } 162 155 163 static function init() { 156 164 //Setup all hooks / filters for either dynamically replacing the host part of a URL with the current host … … 265 273 ); 266 274 267 add_filter('redirect_canonical', function($redirect, $requested) { 268 //Fixes infinite redirect loop caused by WP Core bug: http://core.trac.wordpress.org/ticket/21824 269 if (MP_WP_Root_Relative_URLS::proper_root_relative_url($redirect) == 270 MP_WP_Root_Relative_URLS::proper_root_relative_url($requested)) { 271 return false; 272 } 273 }, 10, 2); 275 add_filter( 276 'redirect_canonical', 277 array( 278 'MP_WP_Root_Relative_URLS', 279 'fix_canonical_redirect' 280 ), 281 10, 282 2 283 ); 274 284 } 275 285 }
Note: See TracChangeset
for help on using the changeset viewer.