[ Index ]

PHP Cross Reference of Wordpress 2.9.1

title

Body

[close]

/wp-admin/js/ -> set-post-thumbnail.dev.js (source)

   1  function WPSetAsThumbnail(id){
   2      var $link = jQuery('a#wp-post-thumbnail-' + id);
   3  
   4      $link.text( setPostThumbnailL10n.saving );
   5      jQuery.post(ajaxurl, {
   6          action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, cookie: encodeURIComponent(document.cookie)
   7      }, function(str){
   8          var win = window.dialogArguments || opener || parent || top;
   9          $link.text( setPostThumbnailL10n.setThumbnail );
  10          if ( str == '0' ) {
  11              alert( setPostThumbnailL10n.error );
  12          } else {
  13              jQuery('a.wp-post-thumbnail').show();
  14              $link.text( setPostThumbnailL10n.done );
  15              $link.fadeOut( 2000 );
  16              win.WPSetThumbnailID(id);
  17              win.WPSetThumbnailHTML(str);
  18          }
  19      }
  20      );
  21  }


Generated: Fri Jan 8 00:19:48 2010 Cross-referenced by PHPXref 0.7