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
This commit is contained in:
Scott Taylor 2013-11-22 17:39:10 +00:00
parent dc01b08a5e
commit 295851d0bb
1 changed files with 2 additions and 2 deletions

View File

@ -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',