WordPress.org

Make WordPress Core

Ticket #9470: 9470.diff

File 9470.diff, 680 bytes (added by wonderboymusic, 11 months ago)
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 03f31ef..abf00b6 100644
    function get_pages($args = '') { 
    37033703 
    37043704        } 
    37053705 
    3706         if ( $parent >= 0 ) 
     3706        if ( is_array( $parent ) ) { 
     3707                $post_parent__in = implode( ',', array_map( 'absint', (array) $parent ) ); 
     3708                if ( ! empty( $post_parent__in ) ) 
     3709                        $where .= " AND post_parent IN ($post_parent__in)"; 
     3710        } elseif ( $parent >= 0 ) { 
    37073711                $where .= $wpdb->prepare(' AND post_parent = %d ', $parent); 
     3712        } 
    37083713 
    37093714        if ( 1 == count( $post_status ) ) { 
    37103715                $where_post_type = $wpdb->prepare( "post_type = %s AND post_status = %s", $post_type, array_shift( $post_status ) );