Changeset 14133
- Timestamp:
- 04/18/2010 04:54:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r14122 r14133 995 995 'numberposts' => 5, 'offset' => 0, 996 996 'category' => 0, 'orderby' => 'post_date', 997 'order' => 'DESC', 'include' => '',998 'exclude' => '', 'meta_key' => '',997 'order' => 'DESC', 'include' => array(), 998 'exclude' => array(), 'meta_key' => '', 999 999 'meta_value' =>'', 'post_type' => 'post', 1000 1000 'suppress_filters' => true … … 1009 1009 $r['cat'] = $r['category']; 1010 1010 if ( ! empty($r['include']) ) { 1011 $incposts = preg_split('/[\s,]+/', $r['include']);1011 $incposts = wp_parse_id_list( $r['include'] ); 1012 1012 $r['posts_per_page'] = count($incposts); // only the number of posts included 1013 1013 $r['post__in'] = $incposts; 1014 1014 } elseif ( ! empty($r['exclude']) ) 1015 $r['post__not_in'] = preg_split('/[\s,]+/',$r['exclude']);1015 $r['post__not_in'] = wp_parse_id_list( $r['exclude'] ); 1016 1016 1017 1017 $r['caller_get_posts'] = true; … … 2935 2935 'child_of' => 0, 'sort_order' => 'ASC', 2936 2936 'sort_column' => 'post_title', 'hierarchical' => 1, 2937 'exclude' => '', 'include' => '',2937 'exclude' => array(), 'include' => array(), 2938 2938 'meta_key' => '', 'meta_value' => '', 2939 2939 'authors' => '', 'parent' => -1, 'exclude_tree' => '', … … 2976 2976 $meta_value = ''; 2977 2977 $hierarchical = false; 2978 $incpages = preg_split('/[\s,]+/',$include);2979 if ( count($incpages) ) {2978 $incpages = wp_parse_id_list( $include ); 2979 if ( ! empty( $incpages ) ) { 2980 2980 foreach ( $incpages as $incpage ) { 2981 2981 if (empty($inclusions)) … … 2991 2991 $exclusions = ''; 2992 2992 if ( !empty($exclude) ) { 2993 $expages = preg_split('/[\s,]+/',$exclude);2994 if ( count($expages) ) {2993 $expages = wp_parse_id_list( $exclude ); 2994 if ( ! empty( $expages ) ) { 2995 2995 foreach ( $expages as $expage ) { 2996 2996 if (empty($exclusions)) … … 3008 3008 $post_authors = preg_split('/[\s,]+/',$authors); 3009 3009 3010 if ( count($post_authors) ) {3010 if ( ! empty( $post_authors ) ) { 3011 3011 foreach ( $post_authors as $post_author ) { 3012 3012 //Do we have an author id or an author login?
Note: See TracChangeset
for help on using the changeset viewer.