[wp-trac] [WordPress Trac] #35654: Make Gallery size default configurable
WordPress Trac
noreply at wordpress.org
Fri Jan 29 07:01:14 UTC 2016
#35654: Make Gallery size default configurable
-------------------------+-----------------------------
Reporter: boblet | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Gallery | Version: 4.4
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Currently it’s not possible to set the default size in the Gallery Sizes
pulldown when adding a gallery—it’s always `thumbnail`.
[[Size pulldown(http://oli.jp/temp/2016-01-29-wp4.4-gallery-size-
setting.png)]]
For example, this code will set `columns` but not `size`
{{{
function my_gallery_defaults( $settings ) {
$settings['galleryDefaults']['columns'] = 2;
$settings['galleryDefaults']['size'] = 'medium';
return $settings;
}
add_filter( 'media_view_settings', 'my_gallery_defaults' );
}}}
This has been mentioned in previous tickets:
- #18143 Adds Sizes pulldown to UI (but no
`$settings['galleryDefaults']['size']`)
- #27515 Request for `$settings['galleryDefaults']['size']` but marked as
dupe of #18143
- #28693 Adds `$settings['galleryDefaults']` support for `columns` and
`link`
- #29032 Request for setting a custom default gallery size but marked as
dupe of #18143
While this can be overridden via the UI, it would be nice to set the
initial Gallery default size for a theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35654>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list