bp_theme_compat_loop_end( object $query )
Restores the ‘is_single’ and ‘is_page’ flags if toggled by BuddyPress.
Description
See also
Parameters
- $query
-
(Required) The WP_Query object.
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
Version | Description |
---|---|
BuddyPress 1.9.2 | 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.