Changeset 6437
- Timestamp:
- 05/27/2017 03:47:49 AM (7 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 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 -
trunk/src/includes/replies/template.php
r6433 r6437 1829 1829 // Reply doesn't have a position so get the raw value 1830 1830 if ( empty( $reply_position ) ) { 1831 $topic_id = ! empty( $topic_id ) ? bbp_get_topic_id( $topic_id ) : bbp_get_reply_topic_id( $reply_id ); 1831 1832 // Get topic ID 1833 $topic_id = ! empty( $topic_id ) 1834 ? bbp_get_topic_id( $topic_id ) 1835 : bbp_get_reply_topic_id( $reply_id ); 1832 1836 1833 1837 // Post is not the topic
Note: See TracChangeset
for help on using the changeset viewer.