Changeset 582122
- Timestamp:
- 08/06/2012 12:46:28 AM (14 years ago)
- Location:
- absolute-to-relative-urls/trunk
- Files:
-
- 2 edited
-
absolute-to-relative-urls.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
absolute-to-relative-urls/trunk/absolute-to-relative-urls.php
r580921 r582122 4 4 Plugin URI: http://www.svachon.com/ 5 5 Description: A <strong>function</strong> for use in shortening URL links. Just use <code><strong>absolute_to_relative_url</strong>( string <em>$url</em> [, bool <em>$ignore_www</em> = <em>true</em> [, bool <em>$choose_shortest</em> = <em>true</em>]] )</code>. 6 Version: 0.3 6 Version: 0.3.1 7 7 Author: Steven Vachon 8 8 Author URI: http://www.svachon.com/ … … 326 326 if ($url !== false) 327 327 { 328 // #anchor329 // index.html330 // /index.html331 // http://webserver332 // http://webserver/333 // http://webserver/index.html334 // http://webserver/./../index.html335 336 328 if ($init) 337 329 { … … 426 418 } 427 419 } 428 429 // TEMP :: faster to remove from $absolute_path then merge with $relative_path?430 420 431 421 // Form path … … 452 442 2: shortest possible URL (root- or path-relative) 453 443 */ 454 public function relate_url($url, $ignore_www= true, $output_type=2)444 public function relate_url($url, $ignore_www=false, $output_type=2) 455 445 { 456 446 if ($this->site_url !== false) … … 622 612 2: shortest possible URL (root- or path-relative) 623 613 */ 624 function absolute_to_relative_url($url, $ignore_www= true, $output_type=2)614 function absolute_to_relative_url($url, $ignore_www=false, $output_type=2) 625 615 { 626 616 global $absolute_to_relative_url_instance; -
absolute-to-relative-urls/trunk/readme.txt
r580924 r582122 62 62 == Changelog == 63 63 64 = 0.3.1 = 65 * Domains with and without "www." are no longer considered to be identical by default, but can still be overridden 66 64 67 = 0.3 = 65 68 * Scheme-relative URLs (`//domain.com`) now supported on input and output
Note: See TracChangeset
for help on using the changeset viewer.