Edit File by line
/home/barbar84/www/wp-admin/js
File: set-post-thumbnail.js
/**
[0] Fix | Delete
* @output wp-admin/js/set-post-thumbnail.js
[1] Fix | Delete
*/
[2] Fix | Delete
[3] Fix | Delete
/* global ajaxurl, post_id, alert */
[4] Fix | Delete
/* exported WPSetAsThumbnail */
[5] Fix | Delete
[6] Fix | Delete
window.WPSetAsThumbnail = function( id, nonce ) {
[7] Fix | Delete
var $link = jQuery('a#wp-post-thumbnail-' + id);
[8] Fix | Delete
[9] Fix | Delete
$link.text( wp.i18n.__( 'Saving…' ) );
[10] Fix | Delete
jQuery.post(ajaxurl, {
[11] Fix | Delete
action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
[12] Fix | Delete
}, function(str){
[13] Fix | Delete
var win = window.dialogArguments || opener || parent || top;
[14] Fix | Delete
$link.text( wp.i18n.__( 'Use as featured image' ) );
[15] Fix | Delete
if ( str == '0' ) {
[16] Fix | Delete
alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) );
[17] Fix | Delete
} else {
[18] Fix | Delete
jQuery('a.wp-post-thumbnail').show();
[19] Fix | Delete
$link.text( wp.i18n.__( 'Done' ) );
[20] Fix | Delete
$link.fadeOut( 2000 );
[21] Fix | Delete
win.WPSetThumbnailID(id);
[22] Fix | Delete
win.WPSetThumbnailHTML(str);
[23] Fix | Delete
}
[24] Fix | Delete
}
[25] Fix | Delete
);
[26] Fix | Delete
};
[27] Fix | Delete
[28] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function