WordPress/wp-admin/js/site-icon.min.js
Konstantin Obenland cf22cd7d72 Site Icon: Remove date dropdown from media modal.
This also allows us to leverage the builtin `suggestedWidth` and
`suggestedHeight` parameters to convey the expected image size.

Props ocean90.
Fixes #32860.


Built from https://develop.svn.wordpress.org/trunk@33075


git-svn-id: http://core.svn.wordpress.org/trunk@33046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 21:28:24 +00:00

1 line
523 B
JavaScript

!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);