bp_is_single_document()

Is the current page a single document item permalink?

Description

Return

(bool) True if the current page is a single document item permalink.

Source

File: bp-core/bp-core-template.php

function bp_is_single_document() {

	if ( bp_is_active( 'groups' ) && bp_is_group() && bp_is_group_document() && is_numeric( bp_action_variable( 0 ) ) ) {
		return true;
	}

	return (bool) ( bp_is_media_component() && 'my-document' == bp_current_action() && is_numeric( bp_action_variable( 0 ) ) );
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.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.