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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51239 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2021-06-25 15:24:14 +00:00
parent a3acf737e1
commit eb8c724ea7

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'];