Make WordPress Core

Changeset 24447


Ignore:
Timestamp:
06/19/2013 09:55:17 PM (11 years ago)
Author:
markjaquith
Message:

Restore code that returns the existing media object if it already exists.

props programmin, adamsilverstein. fixes #24062

File:
1 edited

Legend:

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

    r24161 r24447  
    539539        add: function( id, options ) {
    540540            var workflow = this.get( id );
     541
     542            if ( workflow ) // only add once: if exists return existing
     543                return workflow;
    541544
    542545            workflow = workflows[ id ] = wp.media( _.defaults( options || {}, {
Note: See TracChangeset for help on using the changeset viewer.