# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 327 | 327 | $post_fields = array_filter( compact( array( 'post_author', 'post_name', 'post_parent', 'post_status', 'post_type', ) ) ); |
| 328 | 328 | if ( ! empty( $post_fields ) ) { |
| 329 | 329 | $join = "JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID"; |
| 330 | | foreach( $post_fields as $field_name => $field_value ) |
| 331 | | $where .= $wpdb->prepare( " AND {$wpdb->posts}.{$field_name} = %s", $field_value ); |
| | 330 | foreach( $post_fields as $field_name => $field_value ) { |
| | 331 | $field_value = (array)$field_value; |
| | 332 | $where .= $wpdb->prepare( " AND ( {$wpdb->posts}.{$field_name} = %s", array_pop($field_value)); |
| | 333 | foreach ( $field_value as $value ) { |
| | 334 | $where .= $wpdb->prepare( " OR {$wpdb->posts}.{$field_name} = %s", $value ); |
| 332 | 335 | } |
| | 336 | $where .= $wpdb->prepare( " ) "); |
| | 337 | } |
| | 338 | } |
| 333 | 339 | |
| 334 | 340 | $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' ); |
| 335 | 341 | $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) ); |