From 49a6a149155880fdc59bab160bd462b6f5313f2d Mon Sep 17 00:00:00 2001 From: desrosj Date: Fri, 25 Jun 2021 15:25:59 +0000 Subject: [PATCH] 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 --- .../rest-api/endpoints/class-wp-rest-widgets-controller.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php index 29daf4b1d9..b3bd5ae5ac 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php @@ -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']; diff --git a/wp-includes/version.php b/wp-includes/version.php index e4f6180724..0992c6ed06 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.