mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-25 17:51:27 +01:00
Media: Remove default gallery shortcode attributes when generating shortcode output. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3f630bf0fa
commit
00377a42f4
@ -214,7 +214,6 @@ var tb_position;
|
|||||||
return {
|
return {
|
||||||
defaults: {
|
defaults: {
|
||||||
order: 'ASC',
|
order: 'ASC',
|
||||||
orderby: 'post__in',
|
|
||||||
id: wp.media.view.settings.postId,
|
id: wp.media.view.settings.postId,
|
||||||
itemtag: 'dl',
|
itemtag: 'dl',
|
||||||
icontag: 'dt',
|
icontag: 'dt',
|
||||||
@ -280,6 +279,12 @@ var tb_position;
|
|||||||
if ( attrs.ids && 'post__in' === attrs.orderby )
|
if ( attrs.ids && 'post__in' === attrs.orderby )
|
||||||
delete attrs.orderby;
|
delete attrs.orderby;
|
||||||
|
|
||||||
|
// Remove default attributes from the shortcode.
|
||||||
|
_.each( wp.media.gallery.defaults, function( value, key ) {
|
||||||
|
if ( value === attrs[ key ] )
|
||||||
|
delete attrs[ key ];
|
||||||
|
});
|
||||||
|
|
||||||
shortcode = new wp.shortcode({
|
shortcode = new wp.shortcode({
|
||||||
tag: 'gallery',
|
tag: 'gallery',
|
||||||
attrs: attrs,
|
attrs: attrs,
|
||||||
|
Loading…
Reference in New Issue
Block a user