From db1c44bc421e95f428f471754a423ab4ead30f86 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 17 Feb 2014 21:22:25 +0000 Subject: [PATCH] `wp_get_post_revisions()` should have a default `orderby` of `date ID` to tie-break rapidly added revisions - namely, when unit tests are run. There is a test that occasionally fails when running all tests, and always fails when running `phpunit tests/phpunit/tests/post/revisions.php `. This fixes that. Fixes #26042. git-svn-id: https://develop.svn.wordpress.org/trunk@27184 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/revision.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php index 12cc8e1c4f..781f1a0975 100644 --- a/src/wp-includes/revision.php +++ b/src/wp-includes/revision.php @@ -371,7 +371,7 @@ function wp_get_post_revisions( $post_id = 0, $args = null ) { if ( ! $post || empty( $post->ID ) ) return array(); - $defaults = array( 'order' => 'DESC', 'orderby' => 'date', '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 ) )