Skip to:
Content

bbPress.org

Changeset 3666


Ignore:
Timestamp:
01/14/2012 07:32:12 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Go live with bbp_query_post_parentin() filter.

Location:
branches/plugin/bbp-includes
Files:
2 edited

Legend:

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

    r3659 r3666  
    12251225    // Including specific post_parent's
    12261226    if ( ! empty( $object->query_vars['post_parent__in'] ) ) {
    1227         $ids    = implode( ',', array_map( 'absint', $object->query_vars['post_parent__in'][0] ) );
     1227        $ids    = implode( ',', array_map( 'absint', $object->query_vars['post_parent__in'] ) );
    12281228        $where .= " AND $wpdb->posts.post_parent IN ($ids)";
    12291229
    12301230    // Excluding specific post_parent's
    12311231    } elseif ( ! empty( $object->query_vars['post_parent__not_in'] ) ) {
    1232         $ids    = implode( ',', array_map( 'absint', $object->query_vars['post_parent__not_in'][0] ) );
     1232        $ids    = implode( ',', array_map( 'absint', $object->query_vars['post_parent__not_in'] ) );
    12331233        $where .= " AND $wpdb->posts.post_parent NOT IN ($ids)";
    12341234    }
     
    12371237    return $where;
    12381238}
    1239 //add_filter( 'posts_where', 'bbp_query_post_parent__in', 10, 2 );
    12401239
    12411240/**
  • branches/plugin/bbp-includes/bbp-core-hooks.php

    r3654 r3666  
    410410add_filter( 'comments_open', 'bbp_force_comment_status' );
    411411
     412// Add post_parent__in to posts_where
     413add_filter( 'posts_where', 'bbp_query_post_parent__in', 10, 2 );
     414
    412415/**
    413416 * Add filters to anonymous post author data
Note: See TracChangeset for help on using the changeset viewer.