Make WordPress Core

Changeset 26329


Ignore:
Timestamp:
11/22/2013 05:38:34 PM (11 years ago)
Author:
wonderboymusic
Message:

In get_posts(), alter the doc block and default args to make orderby equal to date, not post_date.

Props ounziw.
Fixes #26128.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r25974 r26329  
    16531653 *     'offset' - Default is 0. See {@link WP_Query::query()} for more.
    16541654 *     'category' - What category to pull the posts from.
    1655  *     'orderby' - Default is 'post_date'. How to order the posts.
     1655 *     'orderby' - Default is 'date', which orders based on post_date. How to order the posts.
    16561656 *     'order' - Default is 'DESC'. The order to retrieve the posts.
    16571657 *     'include' - See {@link WP_Query::query()} for more.
     
    16731673    $defaults = array(
    16741674        'numberposts' => 5, 'offset' => 0,
    1675         'category' => 0, 'orderby' => 'post_date',
     1675        'category' => 0, 'orderby' => 'date',
    16761676        'order' => 'DESC', 'include' => array(),
    16771677        'exclude' => array(), 'meta_key' => '',
Note: See TracChangeset for help on using the changeset viewer.