Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/01/2011 07:01:48 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Use pre_get_posts to filter out hidden forum content instead of using multiple calls to bbp_exclude_forum_ids().

This ensures that no hidden or private forum content leaks out into widgets, profiles, and views, and also limits the liability of future plugins from needing to exclude those forum_id's manually.

The behavior of bbp_exclude_forum_ids() has changed to handle the gathering of forum ID's to be excluded, with the optional parameter to return results in different formats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-topic-functions.php

    r3287 r3291  
    26132613 * @global bbPress $bbp
    26142614 *
    2615  * @uses bbp_exclude_forum_ids()
    26162615 * @uses bbp_is_topic()
    26172616 * @uses bbp_user_can_view_forum()
     
    26442643        return;
    26452644
    2646     // Remove any topics from hidden forums
    2647     $topics_query = bbp_exclude_forum_ids( $topics_query );
    2648 
    26492645    // Display the feed
    26502646    header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
Note: See TracChangeset for help on using the changeset viewer.