Support » Alpha/Beta/RC » Wp_get_post_revisions doesn't return latest revision first

  • Resolved blogger323


    After reading operations in wp_save_post_revision, it’s no doubt that wp_get_post_revisions has to return latest revision first. But after #27184 changeset, it seems that it returns oldest revision first.

    In #27184 changeset, default values for query was changed.

    $defaults = array( 'order' => 'DESC', 'orderby' => 'date ID', 'check_enabled' => true );

    Now the order-by clause became like following.

    ORDER BY wp_posts.post_date,wp_posts.ID DESC

    But it should be:

    ORDER BY wp_posts.post_date DESC,wp_posts.ID DESC
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wp_get_post_revisions doesn't return latest revision first’ is closed to new replies.