[wp-trac] [WordPress Trac] #19654: Allow overload of is_ssl() via a filter

WordPress Trac noreply at wordpress.org
Thu Aug 8 12:01:36 UTC 2013


#19654: Allow overload of is_ssl() via a filter
-------------------------+----------------------
 Reporter:  superkus     |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Plugins      |     Version:  3.3
 Severity:  minor        |  Resolution:  invalid
 Keywords:  2nd-opinion  |
-------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 I'm going with Westi and Nacin here, filtering it doesn't achieve a good
 result.

 Filtering it would be excellent if the value of the function could change
 during normal execution of a !WordPress page load, but for low level
 configurations like this that are consistent with a request, you're far
 better off with defining it in `wp-config.php` like so:
 {{{
 if ( 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] )
    $_SERVER['HTTPS'] = 'on';
 }}}

 Either way, you have to add custom PHP, and doing it in your configuration
 file is the best location to ensure that all plugins and is_ssl() calls
 before plugins get loaded work correctly 100% of the time.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/19654#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list