diff --git wp-includes/post.php wp-includes/post.php
index 1854459..28712de 100644
|
|
function get_pages($args = '') { |
3624 | 3624 | $cache = array(); |
3625 | 3625 | |
3626 | 3626 | $inclusions = ''; |
3627 | | if ( !empty($include) ) { |
| 3627 | if ( ! empty( $include ) ) { |
3628 | 3628 | $child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include |
3629 | 3629 | $parent = -1; |
3630 | 3630 | $exclude = ''; |
… |
… |
function get_pages($args = '') { |
3632 | 3632 | $meta_value = ''; |
3633 | 3633 | $hierarchical = false; |
3634 | 3634 | $incpages = wp_parse_id_list( $include ); |
3635 | | if ( ! empty( $incpages ) ) { |
3636 | | foreach ( $incpages as $incpage ) { |
3637 | | if (empty($inclusions)) |
3638 | | $inclusions = $wpdb->prepare(' AND ( ID = %d ', $incpage); |
3639 | | else |
3640 | | $inclusions .= $wpdb->prepare(' OR ID = %d ', $incpage); |
3641 | | } |
3642 | | } |
| 3635 | |
| 3636 | if ( ! empty( $incpages ) ) |
| 3637 | $inclusions = ' AND ID IN (' . join( ',', $incpages ) . ')'; |
3643 | 3638 | } |
3644 | | if (!empty($inclusions)) |
3645 | | $inclusions .= ')'; |
3646 | 3639 | |
3647 | 3640 | $exclusions = ''; |
3648 | | if ( !empty($exclude) ) { |
| 3641 | if ( ! empty( $exclude ) ) { |
3649 | 3642 | $expages = wp_parse_id_list( $exclude ); |
3650 | | if ( ! empty( $expages ) ) { |
3651 | | foreach ( $expages as $expage ) { |
3652 | | if (empty($exclusions)) |
3653 | | $exclusions = $wpdb->prepare(' AND ( ID <> %d ', $expage); |
3654 | | else |
3655 | | $exclusions .= $wpdb->prepare(' AND ID <> %d ', $expage); |
3656 | | } |
3657 | | } |
| 3643 | if ( ! empty( $expages ) ) |
| 3644 | $exclusions = ' AND ID NOT IN (' . join( ',', $expages ) . ')'; |
3658 | 3645 | } |
3659 | | if (!empty($exclusions)) |
3660 | | $exclusions .= ')'; |
3661 | 3646 | |
3662 | 3647 | $author_query = ''; |
3663 | 3648 | if (!empty($authors)) { |