WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/22/2014 06:50:11 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Remove unnecessary array_reverse() from wp_get_post_revisions().

WP_Query properly handles multiple 'orderby' values since [28541].

fixes #26042.

File:
1 edited

Legend:

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

    r28541 r28543  
    418418        return array();
    419419
    420     $defaults = array( 'order' => 'ASC', 'orderby' => 'date ID', 'check_enabled' => true );
     420    $defaults = array( 'order' => 'DESC', 'orderby' => 'date ID', 'check_enabled' => true );
    421421    $args = wp_parse_args( $args, $defaults );
    422422
     
    428428    if ( ! $revisions = get_children( $args ) )
    429429        return array();
    430 
    431     $revisions = array_reverse( $revisions );
    432430
    433431    return $revisions;
Note: See TracChangeset for help on using the changeset viewer.