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

props programmin, adamsilverstein. fixes #24062

git-svn-id: http://core.svn.wordpress.org/trunk@24447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-06-19 21:55:17 +00:00
parent 3231e8cbd0
commit e1923d4783

View File

@ -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',