Changeset 25168 for trunk/src/wp-includes/post.php
- Timestamp:
- 08/29/2013 06:48:29 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r25160 r25168 3672 3672 3673 3673 $inclusions = ''; 3674 if ( ! empty($include) ) {3674 if ( ! empty( $include ) ) { 3675 3675 $child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include 3676 3676 $parent = -1; … … 3680 3680 $hierarchical = false; 3681 3681 $incpages = wp_parse_id_list( $include ); 3682 if ( ! empty( $incpages ) ) { 3683 foreach ( $incpages as $incpage ) { 3684 if (empty($inclusions)) 3685 $inclusions = $wpdb->prepare(' AND ( ID = %d ', $incpage); 3686 else 3687 $inclusions .= $wpdb->prepare(' OR ID = %d ', $incpage); 3688 } 3689 } 3690 } 3691 if (!empty($inclusions)) 3692 $inclusions .= ')'; 3682 if ( ! empty( $incpages ) ) 3683 $inclusions = ' AND ID IN (' . implode( ',', array_map( 'intval', $incpages ) ) . ')'; 3684 } 3693 3685 3694 3686 $exclusions = ''; 3695 if ( ! empty($exclude) ) {3687 if ( ! empty( $exclude ) ) { 3696 3688 $expages = wp_parse_id_list( $exclude ); 3697 if ( ! empty( $expages ) ) { 3698 foreach ( $expages as $expage ) { 3699 if (empty($exclusions)) 3700 $exclusions = $wpdb->prepare(' AND ( ID <> %d ', $expage); 3701 else 3702 $exclusions .= $wpdb->prepare(' AND ID <> %d ', $expage); 3703 } 3704 } 3705 } 3706 if (!empty($exclusions)) 3707 $exclusions .= ')'; 3689 if ( ! empty( $expages ) ) 3690 $exclusions = ' AND ID NOT IN (' . implode( ',', array_map( 'intval', $expages ) ) . ')'; 3691 } 3708 3692 3709 3693 $author_query = '';
Note: See TracChangeset
for help on using the changeset viewer.