Changeset 4805 for trunk/includes/replies/functions.php
- Timestamp:
- 03/15/2013 08:34:43 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/replies/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/replies/functions.php
r4798 r4805 1729 1729 function _bbp_has_replies_where( $where = '', $query = false ) { 1730 1730 1731 /** Bail ******************************************************************/ 1732 1731 1733 // Bail if the sky is falling 1732 if ( empty( $where ) || empty( $query ) ) 1734 if ( empty( $where ) || empty( $query ) ) { 1733 1735 return $where; 1736 } 1734 1737 1735 1738 // Bail if no post_parent to replace 1736 if ( ! is_numeric( $query->get( 'post_parent' ) ) ) 1739 if ( ! is_numeric( $query->get( 'post_parent' ) ) ) { 1737 1740 return $where; 1741 } 1738 1742 1739 1743 // Bail if not a topic and reply query 1740 if ( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) != $query->get( 'post_type' ) ) 1744 if ( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) != $query->get( 'post_type' ) ) { 1741 1745 return $where; 1742 1743 // Bail if meta query (cannot FORCE INDEX when join'ing postmeta) 1744 if ( $query->get( 'meta_key' ) || $query->get( 'meta_query' ) ) 1746 } 1747 1748 // Bail if including or excluding specific post ID's 1749 if ( $query->get( 'post__not_in' ) || $query->get( 'post__in' ) ) { 1745 1750 return $where; 1746 1747 // Bail if including or excluding specific post ID's 1748 if ( $query->get( 'post__not_in' ) || $query->get( 'post__in' ) ) 1749 return $where; 1751 } 1752 1753 /** Proceed ***************************************************************/ 1750 1754 1751 1755 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.