summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/likes/post-count-jetpack.js')
-rw-r--r--plugins/jetpack/modules/likes/post-count-jetpack.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/likes/post-count-jetpack.js b/plugins/jetpack/modules/likes/post-count-jetpack.js
new file mode 100644
index 00000000..1059e9bd
--- /dev/null
+++ b/plugins/jetpack/modules/likes/post-count-jetpack.js
@@ -0,0 +1,20 @@
+var wpPostLikeCount = wpPostLikeCount || {};
+
+( function( $ ) {
+ wpPostLikeCount = jQuery.extend( wpPostLikeCount, {
+ request: function( options ) {
+ return $.ajax( {
+ type: 'GET',
+ url: wpPostLikeCount.jsonAPIbase + options.path,
+ dataType: 'jsonp',
+ data: options.data,
+ success: function( response ) {
+ options.success( response );
+ },
+ error: function( response ) {
+ options.error( response );
+ },
+ } );
+ },
+ } );
+} )( jQuery );