Opened 9 years ago
Closed 9 years ago
#36810 closed defect (bug) (duplicate)
Make gallery defaults configurable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5.2 |
Component: | Gallery | Keywords: | |
Focuses: | Cc: |
Description ¶
in file:
./wp-includes/media-template.php
wrong code:
<option value="<?php echo esc_attr( $size ); ?>">
change to:
<option value="<?php echo esc_attr( $size ); ?>" <# if ( "<?php echo esc_attr( $size ); ?>" == wp.media.galleryDefaults.size ) { #>selected="selected"<# } #> >
for use:
function theme_gallery_defaults( $settings ) { $settings['galleryDefaults']['size'] = 'medium'; return $settings; } add_filter( 'media_view_settings', 'theme_gallery_defaults' );
Pull Requests
- Loading…
Note: See
TracTickets for help on using
tickets.
Duplicate of #35654.