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
This commit is contained in:
TimothyBlynJacobs 2021-10-02 21:45:03 +00:00
parent e286586eda
commit bb7a0cf334
2 changed files with 3 additions and 1 deletions

View File

@ -237,6 +237,8 @@ class WP_REST_Widget_Types_Controller extends WP_REST_Controller {
$widgets[ $widget['id'] ] = $widget; $widgets[ $widget['id'] ] = $widget;
} }
ksort( $widgets );
return $widgets; return $widgets;
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.