Have get_boundary_post sort by post_date, not ID. props scribu, jk0. fixes #14035.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-09-26 08:31:16 +00:00
parent dfadcb73fc
commit a89ebb3322
1 changed files with 2 additions and 2 deletions

View File

@ -1136,7 +1136,7 @@ function prev_post_rel_link($title = '%title', $in_same_cat = false, $excluded_c
/**
* Retrieve boundary post.
*
* Boundary being either the first or last post by publish date within the contraitns specified
* Boundary being either the first or last post by publish date within the constraints specified
* by in same category or excluded categories.
*
* @since 2.8.0
@ -1176,7 +1176,7 @@ function get_boundary_post($in_same_cat = false, $excluded_categories = '', $sta
$order = $start ? 'ASC' : 'DESC';
return get_posts( array('numberposts' => 1, 'no_found_rows' => true, 'order' => $order, 'orderby' => 'ID', 'category' => $categories) );
return get_posts( array('numberposts' => 1, 'category' => $categories, 'order' => $order) );
}
/**