jQuery(document).ready(function(t){var e,a,i;e=".custom_media_button",a=!0,i=wp.media.editor.send.attachment,t("body").on("click",e,function(e){var n="#"+t(this).attr("id"),r=(t(n),wp.media.editor.send.attachment,t(n));return r.attr("id").replace("_button",""),a=!0,wp.media.editor.send.attachment=function(r,d){if(!a)return i.apply(n,[r,d]);t(e.target).siblings(".custom_media_url").val(d.url).trigger("change")},wp.media.editor.open(r),!1})});