mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 22:15:28 +00:00
Remove unnecessary array_reverse() from wp_get_post_revisions().
WP_Query properly handles multiple 'orderby' values since [28541]. fixes #26042. Built from https://develop.svn.wordpress.org/trunk@28543 git-svn-id: http://core.svn.wordpress.org/trunk@28369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e4bc49c244
commit
fdaa694ac7
@ -417,7 +417,7 @@ function wp_get_post_revisions( $post_id = 0, $args = null ) {
|
||||
if ( ! $post || empty( $post->ID ) )
|
||||
return array();
|
||||
|
||||
$defaults = array( 'order' => 'ASC', 'orderby' => 'date ID', 'check_enabled' => true );
|
||||
$defaults = array( 'order' => 'DESC', 'orderby' => 'date ID', 'check_enabled' => true );
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
if ( $args['check_enabled'] && ! wp_revisions_enabled( $post ) )
|
||||
@ -428,8 +428,6 @@ function wp_get_post_revisions( $post_id = 0, $args = null ) {
|
||||
if ( ! $revisions = get_children( $args ) )
|
||||
return array();
|
||||
|
||||
$revisions = array_reverse( $revisions );
|
||||
|
||||
return $revisions;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user