WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 7 months ago

#42549 new enhancement

Widgets: Allow gallery widget to display images from currently-queried singular post if no images selected

Reported by: westonruter Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.9
Component: Widgets Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

In #42548 (pending) a [gallery] placed inside of a Text widget will result in the attachments for a given post to be used in the gallery when the widget appears on a singular template. The same behavior could be allowed for the Gallery widget as well. If you add a gallery widget to a sidebar but don't add any images to it, the widget could conditionally show if it is being rendered on a singular template for a post that has image attachments.

Attachments (1)

42549.0.diff (908 bytes) - added by westonruter 7 months ago.

Download all attachments as: .zip

Change History (3)

@westonruter
7 months ago

#1 @westonruter
7 months ago

  • Keywords has-patch added

There may need to be a way to clear a gallery of its selected images. Currently once you select an image, you cannot reset the gallery to be empty without deleting the gallery widget and adding one in its place.

#2 @westonruter
7 months ago

  • Keywords 2nd-opinion added
  • Milestone changed from 4.9.1 to 5.0
Note: See TracTickets for help on using tickets.