Changeset 36381 for trunk/src/wp-includes/class-wp-comment-query.php
- Timestamp:
- 01/22/2016 08:19:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-comment-query.php
r36345 r36381 215 215 * @type int $post_ID Currently unused. 216 216 * @type int $post_id Limit results to those affiliated with a given post ID. 217 * Default 0.217 * Default null. 218 218 * @type array $post__in Array of post IDs to include affiliated comments for. 219 219 * Default empty. … … 277 277 'post_author__not_in' => '', 278 278 'post_ID' => '', 279 'post_id' => 0,279 'post_id' => null, 280 280 'post__in' => '', 281 281 'post__not_in' => '', … … 646 646 } 647 647 648 $post_id = absint( $this->query_vars['post_id'] ); 649 if ( ! empty( $post_id ) ) { 650 $this->sql_clauses['where']['post_id'] = $wpdb->prepare( 'comment_post_ID = %d', $post_id ); 648 if ( strlen( $this->query_vars['post_id'] ) ) { 649 $this->sql_clauses['where']['post_id'] = $wpdb->prepare( 'comment_post_ID = %d', $this->query_vars['post_id'] ); 651 650 } 652 651
Note: See TracChangeset
for help on using the changeset viewer.