Changeset 596065
- Timestamp:
- 09/07/2012 07:53:50 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
r595971 r596065 109 109 == Changelog == 110 110 111 = 1.7 = 112 * Bug fix: Added fix for users who have customized File Upload paths, image attachments now use root relative urls. 113 111 114 = 1.6 = 112 115 * Bug fix: I really wish php < 5.3 would die - fixed incompatible funciton reference. -
root-relative-urls/trunk/sb_root_relative_urls.php
r595971 r596065 9 9 Author: Marcus E. Pope, marcuspope 10 10 Author URI: http://www.marcuspope.com 11 Version: 1. 611 Version: 1.7 12 12 13 13 Copyright 2011 Marcus E. Pope (email : me@marcuspope.com) … … 161 161 } 162 162 163 static function fix_upload_paths($o) { 164 //Fixes attachment urls when user has customized the base url and/or upload folder in Admin > Settings > Media : Uploading Files 165 $o['url'] = MP_WP_Root_Relative_URLS::proper_root_relative_url($o['url']); 166 $o['baseurl'] = MP_WP_Root_Relative_URLS::proper_root_relative_url($o['baseurl']); 167 return $o; 168 } 169 163 170 static function init() { 164 171 //Setup all hooks / filters for either dynamically replacing the host part of a URL with the current host … … 282 289 2 283 290 ); 291 292 add_filter( 293 'upload_dir', 294 array( 295 'MP_WP_Root_Relative_URLS', 296 'fix_upload_paths' 297 ), 298 1, 299 1 300 ); 284 301 } 285 302 }
Note: See TracChangeset
for help on using the changeset viewer.