Restore code that returns the existing media object if it already exists.
props programmin, adamsilverstein. fixes #24062 git-svn-id: https://develop.svn.wordpress.org/trunk@24447 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
165d0971fe
commit
fb97e258f9
@ -539,6 +539,9 @@
|
||||
add: function( id, options ) {
|
||||
var workflow = this.get( id );
|
||||
|
||||
if ( workflow ) // only add once: if exists return existing
|
||||
return workflow;
|
||||
|
||||
workflow = workflows[ id ] = wp.media( _.defaults( options || {}, {
|
||||
frame: 'post',
|
||||
state: 'insert',
|
||||
|
Loading…
Reference in New Issue
Block a user