Changeset 882327
- Timestamp:
- 03/26/2014 01:24:23 PM (12 years ago)
- Location:
- domain-sharding/trunk
- Files:
-
- 2 edited
-
domain-sharding.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
domain-sharding/trunk/domain-sharding.php
r882326 r882327 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. 57 Version: 1.1.6 8 8 */ 9 9 … … 162 162 $plugin_url = plugin_dir_url(__FILE__); 163 163 164 $main_check_response = ''; 164 165 // Get the contents of the test file. 165 166 $main_check_file = 'domain.check.valid.txt'; 166 167 $main_check_value = wp_remote_get($plugin_url . $main_check_file ); 168 169 if ( isset( $main_check_value['response']['code'] ) ) 170 { 171 $main_check_response = @$main_check_value['response']['code'] . ' ' . @$main_check_value['response']['message']; 172 } 173 167 174 if ( is_array( $main_check_value ) && $main_check_value['response']['code']=='200' ) 168 175 { … … 222 229 } 223 230 } else { 224 $verify_result .= ' <strong style="color:#F00;text-decoration:uppercase;">'.__('The file used to check the subdomain configuration is missing. Try reinstalling the plugin.', $this->_slug).'</strong> ';231 $verify_result .= ' <strong style="color:#F00;text-decoration:uppercase;">'.__('The file used to check the subdomain configuration is missing. Try reinstalling the plugin.', $this->_slug).'</strong> Server Response Code: ' . $main_check_response; 225 232 } 226 233 } … … 365 372 } 366 373 367 function ds_build_domain( $number, $use_schema = true )374 function ds_build_domain( $number, $use_schema = true, $use_path = true ) 368 375 { 369 376 $domain = str_replace('#', $number, $this->ds_domain); … … 371 378 $host_parsed = parse_url($domain); 372 379 373 $domain = $host_parsed['host'] . $host_parsed['path']; 380 $domain = $host_parsed['host']; 381 if ( $use_path && !empty($host_parsed['path']) ) 382 { 383 $domain .= $host_parsed['path']; 384 } 374 385 if ( $use_schema ) 375 386 { … … 450 461 for($x=1;$x<=$max;$x++) 451 462 { 452 $domain = $this->ds_build_domain( $x, false );463 $domain = $this->ds_build_domain( $x, false, false ); 453 464 $data .= "'$domain',\n"; 454 465 } -
domain-sharding/trunk/readme.txt
r882326 r882327 4 4 Requires at least: 2.8 5 5 Tested up to: 3.8.1 6 Stable tag: 1.1. 56 Stable tag: 1.1.6 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.6 = 41 * Fixes subdomain verification process 39 42 40 43 = 1.1.5 =
Note: See TracChangeset
for help on using the changeset viewer.