Changeset 6437 for trunk/src/includes/common/functions.php
- Timestamp:
- 05/27/2017 03:47:49 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r6434 r6437 1689 1689 $post_status = "'" . implode( "', '", $post_status ) . "'"; 1690 1690 $bbp_db = bbp_db(); 1691 1692 // Note that we can't use WP_Query here thanks to post_status assumptions 1691 1693 $query = $bbp_db->prepare( "SELECT ID FROM {$bbp_db->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = %s ORDER BY ID DESC", $parent_id, $post_type ); 1692 1694 $child_ids = (array) $bbp_db->get_col( $query ); 1693 1695 1696 // Always cache the results 1694 1697 wp_cache_set( $cache_id, $child_ids, 'bbpress_posts' ); 1695 } else { 1696 $child_ids = (array) $child_ids; 1697 } 1698 } 1699 1700 // Make sure results are INTs 1701 $child_ids = wp_parse_id_list( $child_ids ); 1698 1702 1699 1703 // Filter and return
Note: See TracChangeset
for help on using the changeset viewer.