Changeset 1100708
- Timestamp:
- 02/26/2015 09:13:50 PM (11 years ago)
- Location:
- domain-sharding/trunk
- Files:
-
- 2 edited
-
domain-sharding.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
domain-sharding/trunk/domain-sharding.php
r1094072 r1100708 5 5 Description: This plugin allows us to change the root domain of images and stylesheets that currently are inside the actual domain and then use a domain sharding structure. 6 6 Author: David Garcia 7 Version: 1.1. 77 Version: 1.1.8 8 8 */ 9 9 … … 24 24 var $ds_max; 25 25 var $ds_exclusions; 26 var $_remove_protocol = false; 26 27 var $aliases_dir; 27 28 … … 91 92 $this->valid = false; 92 93 $this->_check_redirection = false; 94 $this->_remove_protocol = false; 93 95 94 96 $option = get_option('domain_sharding_config'); … … 122 124 $this->valid = !empty($this->ds_domain); 123 125 $this->_check_redirection = !empty( $option['redirect'] ); 126 $this->_remove_protocol = !empty( $option['protocol_less'] ); 124 127 } 125 128 … … 238 241 239 242 $redirect_checked = ''; 240 241 243 if ( !empty($option['redirect']) ) 242 244 { 243 245 $redirect_checked = ' checked="checked"'; 246 } 247 248 $protocol_less_checked = ''; 249 if ( !empty($option['protocol_less']) ) 250 { 251 $protocol_less_checked = ' checked="checked"'; 244 252 } 245 253 … … 278 286 </td> 279 287 </tr> 288 <tr valign="top"> 289 <th scope="row">'.__('Use protocol less urls', $this->_slug ).'</th> 290 <td> 291 <input type="checkbox" id="domain_sharding_protocol_less" name="domain_sharding[protocol_less]" value = "1" '.$protocol_less_checked.' /> 292 <p>'. __('Use addresses like "//img#.domain.tld" instead of "http://img#.domain.tld"', $this->_slug ).'</p> 293 </td> 294 </tr> 280 295 </table> 281 296 <p>'.__('<strong>NOTE:</strong> If you have trouble accessing images using the new address because Wordpress asks you to register the domain then you must insert the following line in the file wp-config.php').'</p> … … 366 381 } 367 382 383 if ( $this->_remove_protocol ) 384 { 385 $url = str_replace('http://', '//', $url); 386 } 387 368 388 $buffer = str_ireplace( '"'.$original, '"'.$url, $buffer ); 369 389 } -
domain-sharding/trunk/readme.txt
r1094072 r1100708 4 4 Requires at least: 2.8 5 5 Tested up to: 4.1.1 6 Stable tag: 1.1. 76 Stable tag: 1.1.8 7 7 8 8 This plugin modify the url of the images to speed up the page browsing. … … 37 37 38 38 == Changelog == 39 40 = 1.1.8 = 41 * Adds support for protocol less urls. The plugin now creates links that are unaware of http/https protocol. Then these links use the main protocol of the page. 39 42 40 43 = 1.1.7 =
Note: See TracChangeset
for help on using the changeset viewer.