post-count-jetpack.js 448 B

123456789101112131415161718
  1. var wpPostLikeCount = wpPostLikeCount || {};
  2. (function($) {
  3. wpPostLikeCount = jQuery.extend( wpPostLikeCount, {
  4. request: function( options ) {
  5. return $.ajax( {
  6. type: 'GET',
  7. url: wpPostLikeCount.jsonAPIbase + options.path,
  8. dataType : 'jsonp',
  9. data: options.data,
  10. success: function( response ) { options.success( response ); },
  11. error: function( response ) { options.error( response ); }
  12. } );
  13. }
  14. } );
  15. })(jQuery);