REST API: Include the sidebar ID when saving a widget.

This ensures backwards compatibility for code expecting this field to be present.

Props strategio, noisysocks, spacedmonkey.
See #53452.
Built from https://develop.svn.wordpress.org/trunk@51239


git-svn-id: http://core.svn.wordpress.org/trunk@50848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2021-06-25 15:25:59 +00:00
parent 5e2b659090
commit 49a6a14915
2 changed files with 2 additions and 1 deletions

View File

@ -478,6 +478,7 @@ class WP_REST_Widgets_Controller extends WP_REST_Controller {
"widget-$id_base" => array(
$number => $instance,
),
'sidebar' => $sidebar_id,
);
} elseif ( isset( $request['form_data'] ) ) {
$form_data = $request['form_data'];

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-beta3-51238';
$wp_version = '5.8-beta3-51239';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.