Media: Remove default gallery shortcode attributes when generating shortcode output. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22715 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-11-20 14:38:20 +00:00
parent f3199b6005
commit fb3d44da9b
1 changed files with 6 additions and 1 deletions

View File

@ -214,7 +214,6 @@ var tb_position;
return {
defaults: {
order: 'ASC',
orderby: 'post__in',
id: wp.media.view.settings.postId,
itemtag: 'dl',
icontag: 'dt',
@ -280,6 +279,12 @@ var tb_position;
if ( attrs.ids && 'post__in' === 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({
tag: 'gallery',
attrs: attrs,