Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/21/2017 07:14:09 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Common: introduce bbp_get_url_scheme() to simplify 'https' vs 'http' scheme concatenation.

This change improves code flow and reduces complexity by eliminating the number of inline is_ssl() checks necessary when URLs are being generated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/template.php

    r6745 r6760  
    12531253    if ( empty( $redirect_to ) ) {
    12541254        if ( isset( $_SERVER['REQUEST_URI'] ) ) {
    1255             $redirect_to = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     1255            $redirect_to = bbp_get_url_scheme() . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    12561256        } else {
    12571257            $redirect_to = wp_get_referer();
Note: See TracChangeset for help on using the changeset viewer.