Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/10/2013 04:29:09 AM (12 years ago)
Author:
johnjamesjacoby
Message:

In bbp_get_dropdown(), remove the hard-coded post_status checker, and trust bbp_pre_get_posts_normalize_forum_visibility() to do its job. We still pass 'post_status' as null, so that get_posts() gets passed the results of bbp_parse_args(). Also, remove 'sort_column' array key from when this used get_pages(), and rely on 'orderby' for get_posts() instead.

In bbp_pre_get_posts_normalize_forum_visibility(), remove empties and duplicates from the $post_stati array.

Fixes #2354.

File:
1 edited

Legend:

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

    r5006 r5010  
    16951695
    16961696        // Add the statuses
    1697         $posts_query->set( 'post_status', $post_stati );
     1697        $posts_query->set( 'post_status', array_unique( array_filter( $post_stati ) ) );
    16981698    }
    16991699
Note: See TracChangeset for help on using the changeset viewer.