Changeset 33653 for trunk/src/wp-includes/query.php
- Timestamp:
- 08/20/2015 02:18:05 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/query.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r33095 r33653 1435 1435 } 1436 1436 1437 $array_keys = array( 'category__in', 'category__not_in', 'category__and', 'post__in', 'post__not_in', 1437 $array_keys = array( 'category__in', 'category__not_in', 'category__and', 'post__in', 'post__not_in', 'post_name__in', 1438 1438 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'post_parent__in', 'post_parent__not_in', 1439 1439 'author__in', 'author__not_in' ); … … 1452 1452 * @since 4.2.0 Introduced the ability to order by specific clauses of a `$meta_query`, by passing the clause's 1453 1453 * array key to `$orderby`. 1454 * @since 4.3.0 Introduced the `$post_name__in` parameter. 1454 1455 * @access public 1455 1456 * … … 1528 1529 * @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides 1529 1530 * 'posts_per_page' when is_archive(), or is_search() are true. 1531 * @type array $post_name__in An array of post slugs that results must match. 1530 1532 * @type string $s Search keyword. 1531 1533 * @type int $second Second of the minute. Default empty. Accepts numbers 0-60. … … 2604 2606 } 2605 2607 2608 // Parameters related to 'post_name'. 2606 2609 if ( '' != $q['name'] ) { 2607 2610 $q['name'] = sanitize_title_for_query( $q['name'] ); … … 2648 2651 $q['name'] = $q['attachment']; 2649 2652 $where .= " AND $wpdb->posts.post_name = '" . $q['attachment'] . "'"; 2650 } 2651 2653 } elseif ( is_array( $q['post_name__in'] ) && ! empty( $q['post_name__in'] ) ) { 2654 $q['post_name__in'] = array_map( 'sanitize_title_for_query', $q['post_name__in'] ); 2655 $where .= " AND $wpdb->posts.post_name IN ('" . implode( "' ,'", $q['post_name__in'] ) . "')"; 2656 } 2652 2657 2653 2658 if ( intval($q['comments_popup']) )
Note: See TracChangeset
for help on using the changeset viewer.