bp_core_catch_no_access()

Catch unauthorized access to certain BuddyPress pages and redirect accordingly.


Description Description


Source 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();
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.