WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 4 weeks ago

#42285 closed defect (bug) (fixed)

Widgets: Improve extensibility of the Gallery widget

Reported by: westonruter Owned by: westonruter
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-patch commit
Focuses: Cc:

Description

A plugin like Jetpack adds additional fields when constructing a gallery. For example, “Type”:

https://jetpackme.files.wordpress.com/2013/01/gallery-settings.png

There needs to be support for plugins adding additional properties to a given gallery.

See Jetpack issue: https://github.com/Automattic/jetpack/issues/7830

Attachments (1)

42285.0.diff (4.6 KB) - added by westonruter 4 weeks ago.
https://github.com/xwp/wordpress-develop/pull/292

Download all attachments as: .zip

Change History (5)

#1 @westonruter
4 weeks ago

  • Keywords has-patch added
  • Owner set to dsmart
  • Status changed from new to reviewing

#2 @dsmart
4 weeks ago

@westonrouter thanks, this patch works beautifully to allow integration of Jetpack's Tiled Gallery functionality like so:
https://github.com/Automattic/jetpack/pull/8025

Last edited 4 weeks ago by dsmart (previous) (diff)

#3 @westonruter
4 weeks ago

  • Keywords commit added
  • Owner changed from dsmart to westonruter
  • Status changed from reviewing to accepted

#4 @westonruter
4 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 41951:

Widgets: Improve extensibility of the Gallery widget and of media widgets generally.

  • Introduce a widget_{$id_base}_instance_schema filter for plugins to add new properties to a media widget's instance schema.
  • Pass all of a gallery widget's instance props to the gallery media frame, not just the ones that core supports.

See #32417, #41914.
Fixes #42285.

Note: See TracTickets for help on using tickets.