Ticket #20756: page-by-reference.diff
| File page-by-reference.diff, 936 bytes (added by wonderboymusic, 9 months ago) |
|---|
-
wp-includes/post.php
3390 3390 function &get_pages($args = '') { 3391 3391 global $wpdb; 3392 3392 3393 $pages = false; 3394 3393 3395 $defaults = array( 3394 3396 'child_of' => 0, 'sort_order' => 'ASC', 3395 3397 'sort_column' => 'post_title', 'hierarchical' => 1, … … 3408 3410 // Make sure the post type is hierarchical 3409 3411 $hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) ); 3410 3412 if ( !in_array( $post_type, $hierarchical_post_types ) ) 3411 return false;3413 return $pages; 3412 3414 3413 3415 // Make sure we have a valid post status 3414 3416 if ( !is_array( $post_status ) ) 3415 3417 $post_status = explode( ',', $post_status ); 3416 3418 if ( array_diff( $post_status, get_post_stati() ) ) 3417 return false;3419 return $pages; 3418 3420 3419 3421 $cache = array(); 3420 3422 $key = md5( serialize( compact(array_keys($defaults)) ) );
