Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/22/2013 05:38:55 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Update bbp_redirect_to_field() to not use home_url(), and instead use super globals. Props alex-ye. Fixes #2155.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/template-tags.php

    r4699 r4700  
    11321132
    11331133        // Make sure we are directing somewhere
    1134         if ( empty( $redirect_to ) )
    1135                 $redirect_to = home_url( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : wp_get_referer() );
     1134        if ( empty( $redirect_to ) ) {
     1135                if ( isset( $_SERVER['REQUEST_URI'] ) ) {
     1136                        $redirect_to = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     1137                } else {
     1138                        $redirect_to = wp_get_referer();
     1139                }
     1140        }
    11361141
    11371142        // Remove loggedout query arg if it's there
Note: See TracChangeset for help on using the changeset viewer.