Changeset 6440
- Timestamp:
- 10/22/2012 07:24:55 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r6355 r6440 573 573 * 574 574 * @package BuddyPress Core 575 * @global BuddyPress $bp Makes sure that there are no conflicts with 576 * status_header() called in bp_core_do_catch_uri() 577 * @uses wp_redirect() 575 * @uses wp_safe_redirect() 578 576 */ 579 577 function bp_core_redirect( $location, $status = 302 ) { 580 global $bp; 581 582 // On some setups, passing the value of wp_get_referer() may result in an empty value for583 // $location, which results in an error. Ensure that wehave a valid URL.584 if ( empty( $location ) ) {578 579 // On some setups, passing the value of wp_get_referer() may result in an 580 // empty value for $location, which results in an error. Ensure that we 581 // have a valid URL. 582 if ( empty( $location ) ) 585 583 $location = bp_get_root_domain(); 586 } 587 588 // Make sure we don't call status_header() in bp_core_do_catch_uri() 589 // as this conflicts with wp_redirect() 590 $bp->no_status_set = true; 591 592 wp_redirect( $location, $status ); 584 585 // Make sure we don't call status_header() in bp_core_do_catch_uri() as this 586 // conflicts with wp_redirect() and wp_safe_redirect(). 587 buddypress()->no_status_set = true; 588 589 wp_safe_redirect( $location, $status ); 593 590 die; 594 591 }
Note: See TracChangeset
for help on using the changeset viewer.