This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BBP_Shortcodes::unset_globals()
Unset some globals in the $bbp object that hold query related info
Description
Source
File: bp-forums/common/shortcodes.php
private function unset_globals() { $bbp = bbpress(); // Unset global queries $bbp->forum_query = new WP_Query(); $bbp->topic_query = new WP_Query(); $bbp->reply_query = new WP_Query(); $bbp->search_query = new WP_Query(); // Unset global ID's $bbp->current_view_id = 0; $bbp->current_forum_id = 0; $bbp->current_topic_id = 0; $bbp->current_reply_id = 0; $bbp->current_topic_tag_id = 0; // Reset the post data wp_reset_postdata(); }
Changelog
Version | Description |
---|---|
bbPress (r3034) | 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.