Allow the width of a gallery to be altered by themes or other code.
Parameters
- self::DEFAULT_WIDTH
int
self::DEFAULT_WIDTH Default gallery width. Default is 265.
- $args
string
Display arguments including before_title, after_title, before_widget, and after_widget.
- $instance
array
The settings for the particular instance of the widget.
Changelog
- Introduced in Jetpack 2.5.0
How to use this hook
Notes
You can use this filter to change the width of the Gallery Widget, like so:function jetpackcom_custom_gallery_content_width(){ return 400; } add_filter( 'gallery_widget_content_width', 'jetpackcom_custom_gallery_content_width' );