Make WordPress Core

Changeset 21902


Ignore:
Timestamp:
09/18/2012 10:59:57 PM (12 years ago)
Author:
koopersmith
Message:

Media JS: Improve auto-add functionality in Workspace.render(). see #21390, [21901].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r21901 r21902  
    8585
    8686        // Renders a view and places it within the modal window.
    87         // Automatically adds a view if `options` are provided.
    88         render: function( id, options ) {
     87        // Automatically adds a view if `constructor` is provided.
     88        render: function( id, constructor, options ) {
    8989            var view;
    9090            id = id || this.get('view');
    9191
    92             if ( options )
    93                 this.add( id, options );
     92            if ( constructor )
     93                this.add( id, constructor, options );
    9494
    9595            view = this.view( id );
Note: See TracChangeset for help on using the changeset viewer.