Plugin Directory

Changeset 1100708


Ignore:
Timestamp:
02/26/2015 09:13:50 PM (11 years ago)
Author:
SultanICQ
Message:

1.1.8

  • 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.
Location:
domain-sharding/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • domain-sharding/trunk/domain-sharding.php

    r1094072 r1100708  
    55Description: 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.
    66Author: David Garcia
    7 Version: 1.1.7
     7Version: 1.1.8
    88*/
    99
     
    2424    var $ds_max;
    2525    var $ds_exclusions;
     26    var $_remove_protocol = false;
    2627    var $aliases_dir;
    2728
     
    9192        $this->valid = false;
    9293        $this->_check_redirection = false;
     94        $this->_remove_protocol = false;
    9395
    9496        $option = get_option('domain_sharding_config');
     
    122124        $this->valid = !empty($this->ds_domain);
    123125        $this->_check_redirection = !empty( $option['redirect'] );
     126        $this->_remove_protocol = !empty( $option['protocol_less'] );
    124127    }
    125128
     
    238241   
    239242        $redirect_checked = '';
    240 
    241243        if ( !empty($option['redirect']) )
    242244        {
    243245            $redirect_checked = ' checked="checked"';
     246        }
     247
     248        $protocol_less_checked = '';
     249        if ( !empty($option['protocol_less']) )
     250        {
     251            $protocol_less_checked = ' checked="checked"';
    244252        }
    245253
     
    278286            </td>
    279287        </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>
    280295        </table>
    281296        <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>
     
    366381                }
    367382
     383                if ( $this->_remove_protocol )
     384                {
     385                    $url = str_replace('http://', '//', $url);
     386                }
     387
    368388                $buffer = str_ireplace( '"'.$original, '"'.$url, $buffer );
    369389            }
  • domain-sharding/trunk/readme.txt

    r1094072 r1100708  
    44Requires at least: 2.8
    55Tested up to: 4.1.1
    6 Stable tag: 1.1.7
     6Stable tag: 1.1.8
    77
    88This plugin modify the url of the images to speed up the page browsing.
     
    3737
    3838== 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.
    3942
    4043= 1.1.7 =
Note: See TracChangeset for help on using the changeset viewer.