bp_theme_compat_loop_end( object $query )

Restores the ‘is_single’ and ‘is_page’ flags if toggled by BuddyPress.


Description Description

See also See also


Top ↑

Parameters Parameters

$query

(Required) The WP_Query object.


Top ↑

Source Source

File: bp-core/bp-core-theme-compatibility.php

function bp_theme_compat_loop_end( $query ) {

	// Get BuddyPress.
	$bp = buddypress();

	// Bail if page is not toggled.
	if ( ! isset( $bp->theme_compat->is_page_toggled ) ) {
		return;
	}

	// Revert our toggled WP_Query properties.
	$query->is_page = true;

	// Unset our switch.
	unset( $bp->theme_compat->is_page_toggled );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.9.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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