diff --git a/lib/compat.php b/lib/compat.php index 22a282b1a22558..2a592d1683a8bc 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -487,7 +487,7 @@ function gutenberg_posts_orderby( $orderby, $query ) { global $wpdb; if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { if ( 'menu_order' === $query->query['orderby'] ) { - $orderby = "$wpdb->posts.menu_order,$wpdb->posts.post_title,$wpdb->posts.id " . $query->query['order'] ; + $orderby = "$wpdb->posts.menu_order,$wpdb->posts.post_title,$wpdb->posts.id " . $query->query['order']; } } return $orderby;