apply_filters ( 'gallery_widget_content_width', int self::DEFAULT_WIDTH, string $args, array $instance )

Allow the width of a gallery to be altered by themes or other code.

Source file: modules/widgets/gallery.php

View in GitHub

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

Since: Jetpack 2.5.0


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' );

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s