diff --git wp-includes/query.php wp-includes/query.php
index 443d0bb..02d114f 100644
|
|
class WP_Query { |
1661 | 1661 | $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); |
1662 | 1662 | } |
1663 | 1663 | |
| 1664 | if ( isset( $qv['has_password'] ) ) { |
| 1665 | $qv['has_password'] = $qv['has_password'] ? true : false; |
| 1666 | } |
| 1667 | |
1664 | 1668 | if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) |
1665 | 1669 | $this->is_comment_feed = false; |
1666 | 1670 | |
… |
… |
class WP_Query { |
2511 | 2515 | $where .= ')'; |
2512 | 2516 | } |
2513 | 2517 | |
| 2518 | if ( isset( $q['has_password'] ) ) { |
| 2519 | if ( $q['has_password'] ) { |
| 2520 | $where .= " AND $wpdb->posts.post_password != ''"; |
| 2521 | } else { |
| 2522 | $where .= " AND $wpdb->posts.post_password = ''"; |
| 2523 | } |
| 2524 | } |
| 2525 | |
2514 | 2526 | if ( !empty( $this->meta_query->queries ) ) { |
2515 | 2527 | $clauses = $this->meta_query->get_sql( 'post', $wpdb->posts, 'ID', $this ); |
2516 | 2528 | $join .= $clauses['join']; |