Changeset 29808 for trunk/src/wp-includes/comment.php
- Timestamp:
- 10/02/2014 01:40:56 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r29788 r29808 258 258 * 259 259 * @since 3.1.0 260 * @since 4.1.0 Introduced 'comment__in', 'comment__not_in', 261 * 'post__in', and 'post__not_in' to $query_vars. 260 262 * 261 263 * @param string|array $query_vars … … 269 271 'fields' => '', 270 272 'ID' => '', 273 'comment__in' => '', 274 'comment__not_in' => '', 271 275 'karma' => '', 272 276 'number' => '', … … 277 281 'post_ID' => '', 278 282 'post_id' => 0, 283 'post__in' => '', 284 'post__not_in' => '', 279 285 'post_author' => '', 280 286 'post_name' => '', … … 409 415 } 410 416 417 // Parse comment IDs for an IN clause. 418 if ( ! empty( $this->query_vars['comment__in'] ) ) { 419 $where .= ' AND comment_ID IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['comment__in'] ) ) . ' )'; 420 } 421 422 // Parse comment IDs for a NOT IN clause. 423 if ( ! empty( $this->query_vars['comment__not_in'] ) ) { 424 $where .= ' AND comment_ID NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['comment__not_in'] ) ) . ' )'; 425 } 426 427 // Parse comment post IDs for an IN clause. 428 if ( ! empty( $this->query_vars['post__in'] ) ) { 429 $where .= ' AND comment_post_ID IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['post__in'] ) ) . ' )'; 430 } 431 432 // Parse comment post IDs for a NOT IN clause. 433 if ( ! empty( $this->query_vars['post__not_in'] ) ) { 434 $where .= ' AND comment_post_ID NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['post__not_in'] ) ) . ' )'; 435 } 436 411 437 if ( '' !== $this->query_vars['author_email'] ) { 412 438 $where .= $wpdb->prepare( ' AND comment_author_email = %s', $this->query_vars['author_email'] );
Note: See TracChangeset
for help on using the changeset viewer.