Opened 7 years ago
Closed 7 years ago
#41979 closed defect (bug) (fixed)
Caption changes don't cause Gallery widget to refresh in Customizer preview
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | needs-patch |
Focuses: | Cc: |
Description
The Gallery widget (#41914) allows for captions to be supplied for images via the media modal. Whereas the list of attachment ids
are part of the widget instance data, the captions are not. Therefore when just changing a caption then no change will be reflected in the Customizer preview since no change was made to the Customizer setting.
This problem was first encountered in the Image widget (#39993) and the solution there was to put the caption into the instance data itself, and disable the auto-saving of the attachment changes back (see also #40403). For the code that was removed from the Image widget which could be useful for the Gallery widget here, see https://github.com/xwp/wp-core-media-widgets/commit/ddd59e2
Reported by @rabmalin in https://core.trac.wordpress.org/ticket/41914#comment:10
In 41872: