Changeset 570702
- Timestamp:
- 07/11/2012 03:56:23 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
r492470 r570702 98 98 == Changelog == 99 99 100 = 1.4 = 101 * Bug fix: Discovered url fragment identifiers were being dropped entirely from urls, which broke a couple ajax behaviors - most noticeably the menu editor. 102 100 103 = 1.3 = 101 104 * Bug fix: Thanks to Kéri Norbert for noticing that 'get_comment_author_url' should not have been relativized -
root-relative-urls/trunk/sb_root_relative_urls.php
r492470 r570702 9 9 Author: Marcus E. Pope, marcuspope 10 10 Author URI: http://www.marcuspope.com 11 Version: 1. 311 Version: 1.4 12 12 13 13 Copyright 2011 Marcus E. Pope (email : me@marcuspope.com) … … 65 65 $url = @parse_url($url); 66 66 $relative = ltrim(@$url['path'], '/') . (isset($url['query']) ? "?" . $url['query'] : ''); 67 return MP_WP_Root_Relative_URLS::scheme( 'http://' . @$_SERVER['HTTP_HOST'] . (!empty($relative) ? '/' . $relative: '') ); 67 return MP_WP_Root_Relative_URLS::scheme( 68 'http://' . @$_SERVER['HTTP_HOST'] . 69 (!empty($relative) ? '/' . $relative : '') . 70 (isset($url['fragment']) ? '#' . $url['fragment'] : '') 71 ); 68 72 } 69 73 … … 114 118 } else { 115 119 $url = @parse_url($url); 116 return '/' . ltrim(@$url['path'], '/') . (isset($url['query']) ? "?" . $url['query'] : ''); 120 return '/' . ltrim(@$url['path'], '/') . 121 (isset($url['query']) ? "?" . $url['query'] : '') . 122 (isset($url['fragment']) ? '#' . $url['fragment'] : ''); 117 123 } 118 124 }
Note: See TracChangeset
for help on using the changeset viewer.