[wp-trac] Re: [WordPress Trac] #4046: script-loader not https compatible

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 30 00:00:51 GMT 2007


#4046: script-loader not https compatible
---------------------+------------------------------------------------------
 Reporter:  abtime   |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  low      |    Milestone:  2.4      
Component:  General  |      Version:  2.1.2    
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by JeremyVisser):

 This is what I use on my site:

 {{{
 <?php
 /*
         Plugin Name: SSL Backend
         Plugin Author: Jeremy Visser
 */

 $swp_is_backend = ( false !== strpos($_SERVER['REQUEST_URI'], '/wp-
 admin/') );
 $swp_should_ssl = ( $swp_is_backend || isset($_SERVER['HTTPS']) );

 function swp_siteurl($url) {
 // presumes siteurl is set to a http:// address in the options
         return str_replace('http', 'https', $url);
 }

 if ($swp_should_ssl)
         add_filter('option_siteurl', 'swp_siteurl');

 ?>
 }}}

 Yeah, I know. I should be using {{{preg_replace}}} instead, but I can't be
 bothered to learn regular expressions properly.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4046#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list