Ticket #9153: 9153.5.patch
| File 9153.5.patch, 1.2 KB (added by , 17 years ago) |
|---|
-
wp-includes/post.php
2246 2246 $exclusions = $wpdb->prepare(' AND ( ID <> %d ', $expage); 2247 2247 else 2248 2248 $exclusions .= $wpdb->prepare(' AND ID <> %d ', $expage); 2249 } 2249 } 2250 $exclusions .= ')'; 2250 2251 } 2251 2252 } 2252 if (!empty($exclusions))2253 $exclusions .= ')';2254 2253 2255 2254 $author_query = ''; 2256 2255 if (!empty($authors)) { … … 2317 2316 $pages = & get_page_children($child_of, $pages); 2318 2317 2319 2318 if ( !empty($exclude_tree) ) { 2320 $exclude = array(); 2321 2322 $exclude = (int) $exclude_tree; 2323 $children = get_page_children($exclude, $pages); 2324 $excludes = array(); 2325 foreach ( $children as $child ) 2326 $excludes[] = $child->ID; 2327 $excludes[] = $exclude; 2319 $excludes = array_map('intval', explode(',', $exclude_tree)); 2320 2321 // exclude tree will work as describben - self and direct childs only (!) 2328 2322 $total = count($pages); 2329 2323 for ( $i = 0; $i < $total; $i++ ) { 2330 if ( in_array($pages[$i]->ID, $excludes) ) 2324 if ( in_array($pages[$i]->ID, $excludes) || 2325 in_array($pages[$i]->post_parent, $excludes)) 2331 2326 unset($pages[$i]); 2332 2327 } 2333 2328 }