Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #53452, comment 4


Ignore:
Timestamp:
06/20/2021 08:01:17 PM (2 years ago)
Author:
strategio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #53452, comment 4

    initial v1  
    44In our case, we have widgets that needs to know the assigned sidebar in order to set the initial settings. But there's no form element for our widget, the settings UI is shown in another place.
    55
    6 So to be honest, I didn't pay attention to the other form data, but I believe it should be passed to the superglobal to keep WP 5.8 backward compatible with legacy widget.
     6So to be honest, I didn't pay attention to the other form data, but I believe it should be passed to the superglobal to keep WP 5.8 backward compatible with legacy widgets.
    77
    88For the 'sidebar', I believe it's legit to expose this information somewhere because `\WP_Widget::update` is called from `\WP_REST_Widgets_Controller::save_widget` which has this information as the second argument.