Changeset 1833297
- Timestamp:
- 03/04/2018 10:16:15 PM (8 years ago)
- Location:
- force-protocol-less-links/trunk
- Files:
-
- 2 edited
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
force-protocol-less-links/trunk/index.php
r1728502 r1833297 5 5 Description: Replaces http/https links with its protocol-less version (//). 6 6 Author: David Garcia 7 Version: 1. 0.07 Version: 1.1.1 8 8 */ 9 9 … … 11 11 class force_protocol_less_links 12 12 { 13 function __construct()14 {13 function __construct() 14 { 15 15 add_action('init', array(&$this,'process')); 16 }16 } 17 17 function process() 18 18 { 19 ob_start(array($this,'change_protocols'));19 ob_start(array(&$this,'change_protocols')); 20 20 } 21 21 22 function change_protocols( &$buffer)22 function change_protocols($buffer) 23 23 { 24 $buffer = str_replace( array('http://', 'https://') , '//' , $buffer );24 $buffer = str_replace( array('http://', 'https://') , '//' , $buffer ); 25 25 return $buffer; 26 26 } 27 27 } 28 28 29 $force_protocol_less_links = new force_protocol_less_links(); 30 29 $force_protocol_less_links = new force_protocol_less_links(); 30 -
force-protocol-less-links/trunk/readme.txt
r1833294 r1833297 20 20 == Changelog == 21 21 22 = 1.1.1 = 23 * BugFix. Small adjustment 24 22 25 = 1.1.0 = 23 26 * BugFix. ByReference value was passed as a ByValue
Note: See TracChangeset
for help on using the changeset viewer.