Skip to:
Content

bbPress.org

Changeset 5312


Ignore:
Timestamp:
03/05/2014 08:06:48 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Use 'array_diff() rather than array_intersect() in bbp_pre_get_posts_normalize_forum_visibility() to allow custom post_type queries (that still include forums/topics/replies) to pass through without hidden/private forum meta_data` assistance. Fixes #2471.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/functions.php

    r5311 r5312  
    18481848        // Add the statuses
    18491849        $posts_query->set( 'post_status', array_unique( array_filter( $post_stati ) ) );
    1850     }
    1851 
    1852     // Topics Or Replies
    1853     if ( array_intersect( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ), $post_types ) ) {
     1850
     1851    // Some other post type besides bbPress's Forums, Topics, or Replies
     1852    } elseif ( ! array_diff( $post_types, array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ) {
    18541853
    18551854        // Get forums to exclude
Note: See TracChangeset for help on using the changeset viewer.