2015-07-03 17:28:24 -04:00
|
|
|
!function(a){var b;a(function(){a("#choose-from-library-link").on("click",function(c){var d=a(this);return c.preventDefault(),b?void b.open():(b=wp.media({button:{text:d.data("update"),close:!1},states:[new wp.media.controller.Library({title:d.data("choose"),library:wp.media.query({type:"image"}),date:!1,suggestedWidth:d.data("size"),suggestedHeight:d.data("size")})]}),b.on("select",function(){var a=b.state().get("selection").first(),c=d.data("updateLink");window.location=c+"&file="+a.id}),void b.open())})})}(jQuery);
|