From bb7a0cf33475b9872f893ac97c96ba569604ef8f Mon Sep 17 00:00:00 2001 From: TimothyBlynJacobs Date: Sat, 2 Oct 2021 21:45:03 +0000 Subject: [PATCH] REST API: Sort widget types by their id. Fixes #53303. Props spacedmonkey. Built from https://develop.svn.wordpress.org/trunk@51882 git-svn-id: http://core.svn.wordpress.org/trunk@51475 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../endpoints/class-wp-rest-widget-types-controller.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php index 3940566467..82c3a5255e 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php @@ -237,6 +237,8 @@ class WP_REST_Widget_Types_Controller extends WP_REST_Controller { $widgets[ $widget['id'] ] = $widget; } + ksort( $widgets ); + return $widgets; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 48a68bd3d5..e790f801ce 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51881'; +$wp_version = '5.9-alpha-51882'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.