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