File Editor
Directories:
.. (Back)
Files:
post-count-jetpack.min.asset.php
post-count-jetpack.min.js
post-count.min.asset.php
post-count.min.js
queuehandler.min.asset.php
queuehandler.min.js
Create New File
Create
Edit File: post-count.min.js
(()=>{var t;window.wpPostLikeCount=window.wpPostLikeCount||{},t=jQuery,window.wpPostLikeCount=jQuery.extend(window.wpPostLikeCount,{jsonAPIbase:"https://public-api.wordpress.com/rest/v1",APIqueue:[],wpPostLikeCount:function(){t(".post-like-count").each((function(){var o=t(this).attr("data-post-id"),n=t(this).attr("data-blog-id");window.wpPostLikeCount.APIqueue.push("/sites/"+n+"/posts/"+o+"/likes")})),window.wpPostLikeCount.getCounts()},showCount:function(o,n){n>0&&(t("#post-like-count-"+o).find(".comment-count").hide(),t("#post-like-count-"+o).find(".comment-count").text(n),t("#post-like-count-"+o).find(".comment-count").fadeIn())},getCounts:function(){for(var t={path:"/batch",data:"",success:function(t){for(var o in t)if(!t[o].error_data){var n=o.split("/")[4];window.wpPostLikeCount.showCount(n,t[o].found)}},error:function(){}},o="",n=0;n<window.wpPostLikeCount.APIqueue.length;n++)n>0&&(o="&"),t.data+=o+"urls[]="+window.wpPostLikeCount.APIqueue[n];window.wpPostLikeCount.request(t)}}),jQuery(document).ready((function(){window.wpPostLikeCount.wpPostLikeCount()}))})();
Save Changes
Rename File
Rename