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
Parameters Parameters
- $query
-
(Required) The WP_Query object.
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 );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.9.2 | Introduced. |