From 295851d0bb20abc60a81cded6a2b5355b203cafa Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 22 Nov 2013 17:39:10 +0000 Subject: [PATCH] In `get_posts()`, alter the doc block and default args to make `orderby` equal to `date`, not `post_date`. Props ounziw. Fixes #26128. Built from https://develop.svn.wordpress.org/trunk@26329 git-svn-id: http://core.svn.wordpress.org/trunk@26231 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 8770b0dc4f..2546ac2dc8 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1652,7 +1652,7 @@ function set_post_type( $post_id = 0, $post_type = 'post' ) { * 'numberposts' - Default is 5. Total number of posts to retrieve. * 'offset' - Default is 0. See {@link WP_Query::query()} for more. * 'category' - What category to pull the posts from. - * 'orderby' - Default is 'post_date'. How to order the posts. + * 'orderby' - Default is 'date', which orders based on post_date. How to order the posts. * 'order' - Default is 'DESC'. The order to retrieve the posts. * 'include' - See {@link WP_Query::query()} for more. * 'exclude' - See {@link WP_Query::query()} for more. @@ -1672,7 +1672,7 @@ function set_post_type( $post_id = 0, $post_type = 'post' ) { function get_posts($args = null) { $defaults = array( 'numberposts' => 5, 'offset' => 0, - 'category' => 0, 'orderby' => 'post_date', + 'category' => 0, 'orderby' => 'date', 'order' => 'DESC', 'include' => array(), 'exclude' => array(), 'meta_key' => '', 'meta_value' =>'', 'post_type' => 'post',