summaryrefslogtreecommitdiff
blob: 1059e9bda8202591f401c7c36802b77ec03c017d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 );