bp_get_requested_url()
Return the URL as requested on the current page load by the user agent.
Description
Return
(string) Requested URL string.
Source
File: bp-core/bp-core-catchuri.php
function bp_get_requested_url() { $bp = buddypress(); if ( empty( $bp->canonical_stack['requested_url'] ) ) { $bp->canonical_stack['requested_url'] = is_ssl() ? 'https://' : 'http://'; $bp->canonical_stack['requested_url'] .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } /** * Filters the URL as requested on the current page load by the user agent. * * @since BuddyPress 1.7.0 * * @param string $value Requested URL string. */ return apply_filters( 'bp_get_requested_url', $bp->canonical_stack['requested_url'] ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.