CoreFiles by mySites.guru
set-post-thumbnail.dev.js20 lines, 616 bytes, from wordpress-2.9-beta-1.zip
Raw History Compare with 2.8.6-beta1
md5
46375082fc0c79636d28972833ff2172
sha1
934c2105df60c46e725109a89d9b11cdc2ae4225
sha256
0ca3cfdaeb71cdea1dbff14f732f9b880347f3de10d4b196c77793f31b6865bb
function WPSetAsThumbnail(id){
	var $link = jQuery('#media-item-' + id + ' a.wp-post-thumbnail');

	$link.text( setPostThumbnailL10n.saving );
	jQuery.post(ajaxurl, {
		action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, cookie: encodeURIComponent(document.cookie)
	}, function(str){
		var win = window.dialogArguments || opener || parent || top;
		$link.text( setPostThumbnailL10n.setThumbnail );
		if ( str == '0' ) {
			alert( setPostThumbnailL10n.error );
		} else {
			jQuery('a.wp-post-thumbnail').show();
			$link.hide();
			win.WPSetThumbnailID(id);
			win.WPSetThumbnailHTML(str);
		}
	}
	);
}

The same content is in 2 releases, WordPress 2.9-beta-1 to 2.9-beta-2. See them all, or every version of this file.