Changeset 3666
- Timestamp:
- 01/14/2012 07:32:12 AM (12 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-common-functions.php
r3659 r3666 1225 1225 // Including specific post_parent's 1226 1226 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'] ) ); 1228 1228 $where .= " AND $wpdb->posts.post_parent IN ($ids)"; 1229 1229 1230 1230 // Excluding specific post_parent's 1231 1231 } 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'] ) ); 1233 1233 $where .= " AND $wpdb->posts.post_parent NOT IN ($ids)"; 1234 1234 } … … 1237 1237 return $where; 1238 1238 } 1239 //add_filter( 'posts_where', 'bbp_query_post_parent__in', 10, 2 );1240 1239 1241 1240 /** -
branches/plugin/bbp-includes/bbp-core-hooks.php
r3654 r3666 410 410 add_filter( 'comments_open', 'bbp_force_comment_status' ); 411 411 412 // Add post_parent__in to posts_where 413 add_filter( 'posts_where', 'bbp_query_post_parent__in', 10, 2 ); 414 412 415 /** 413 416 * Add filters to anonymous post author data
Note: See TracChangeset
for help on using the changeset viewer.