WordPress.org

Make WordPress Core

Ticket #33065: fix_docs_and_location.patch

File fix_docs_and_location.patch, 1.8 KB (added by enshrined, 6 years ago)

Updated patch

  • wp-includes/query.php

     
    14341434                                $array[$key] = '';
    14351435                }
    14361436
    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',
    14381438                        'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'post_parent__in', 'post_parent__not_in',
    14391439                        'author__in', 'author__not_in' );
    14401440
     
    15271527         *     @type int          $posts_per_page          The number of posts to query for. Use -1 to request all posts.
    15281528         *     @type int          $posts_per_archive_page  The number of posts to query for by archive page. Overrides
    15291529         *                                                 'posts_per_page' when is_archive(), or is_search() are true.
     1530         *     @type array        $post_name__in           An array of post slugs to retrieve, sticky posts will be included
    15301531         *     @type string       $s                       Search keyword.
    15311532         *     @type int          $second                  Second of the minute. Default empty. Accepts numbers 0-60.
    15321533         *     @type array        $search_terms            Array of search terms.
     
    26472648                        $q['attachment'] = sanitize_title_for_query( wp_basename( $q['attachment'] ) );
    26482649                        $q['name'] = $q['attachment'];
    26492650                        $where .= " AND $wpdb->posts.post_name = '" . $q['attachment'] . "'";
     2651                } elseif ( isset( $q['post_name__in'] ) && is_array( $q['post_name__in'] ) && count( $q['post_name__in'] ) > 0) {
     2652                        $q['post_name__in'] = array_map( 'sanitize_title_for_query', $q['post_name__in'] );
     2653                        $where .= " AND $wpdb->posts.post_name IN('" . implode("' ,'", $q['post_name__in']) . "')";
    26502654                }
    26512655
    26522656