Make WordPress Core

Changeset 22715


Ignore:
Timestamp:
11/20/2012 02:38:20 PM (12 years ago)
Author:
koopersmith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/media-upload.js

    r22714 r22715  
    215215            defaults: {
    216216                order:      'ASC',
    217                 orderby:    'post__in',
    218217                id:         wp.media.view.settings.postId,
    219218                itemtag:    'dl',
     
    280279                if ( attrs.ids && 'post__in' === attrs.orderby )
    281280                    delete attrs.orderby;
     281
     282                // Remove default attributes from the shortcode.
     283                _.each( wp.media.gallery.defaults, function( value, key ) {
     284                    if ( value === attrs[ key ] )
     285                        delete attrs[ key ];
     286                });
    282287
    283288                shortcode = new wp.shortcode({
Note: See TracChangeset for help on using the changeset viewer.