]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/set-post-thumbnail.js
WordPress 4.7.2
[autoinstalls/wordpress.git] / wp-admin / js / set-post-thumbnail.js
index e6ac87542c053229af4e76effe6cd9198eab5229..68abbcc83044053261d86461fa8fc4fa2b492baf 100644 (file)
@@ -1,9 +1,12 @@
-function WPSetAsThumbnail(id, nonce){
+/* global setPostThumbnailL10n, ajaxurl, post_id, alert */
+/* exported WPSetAsThumbnail */
+
+function WPSetAsThumbnail( id, nonce ) {
        var $link = jQuery('a#wp-post-thumbnail-' + id);
 
        $link.text( setPostThumbnailL10n.saving );
        jQuery.post(ajaxurl, {
-               action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie)
+               action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
        }, function(str){
                var win = window.dialogArguments || opener || parent || top;
                $link.text( setPostThumbnailL10n.setThumbnail );