bp_core_catch_no_access()
Catch unauthorized access to certain BuddyPress pages and redirect accordingly.
Description
Source
File: bp-core/bp-core-catchuri.php
function bp_core_catch_no_access() { global $wp_query; $bp = buddypress(); // If coming from bp_core_redirect() and $bp_no_status_set is true, // we are redirecting to an accessible page so skip this check. if ( !empty( $bp->no_status_set ) ) return false; if ( !isset( $wp_query->queried_object ) && !bp_is_blog_page() ) { bp_do_404(); } }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.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.