[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: post-count.js
window.wpPostLikeCount = window.wpPostLikeCount || {}; ( function ( $ ) { window.wpPostLikeCount = jQuery.extend( window.wpPostLikeCount, { jsonAPIbase: 'https://public-api.wordpress.com/rest/v1', APIqueue: [], wpPostLikeCount: function () { $( '.post-like-count' ).each( function () { var post_id = $( this ).attr( 'data-post-id' ); var blog_id = $( this ).attr( 'data-blog-id' ); window.wpPostLikeCount.APIqueue.push( '/sites/' + blog_id + '/posts/' + post_id + '/likes' ); } ); window.wpPostLikeCount.getCounts(); }, showCount: function ( post_id, count ) { if ( count > 0 ) { $( '#post-like-count-' + post_id ) .find( '.comment-count' ) .hide(); $( '#post-like-count-' + post_id ) .find( '.comment-count' ) .text( count ); $( '#post-like-count-' + post_id ) .find( '.comment-count' ) .fadeIn(); } }, getCounts: function () { var batchRequest = { path: '/batch', data: '', success: function ( response ) { for ( var path in response ) { if ( ! response[ path ].error_data ) { var urlPieces = path.split( '/' ); // pieces[4] = post id; var post_id = urlPieces[ 4 ]; window.wpPostLikeCount.showCount( post_id, response[ path ].found ); } } }, error: function (/*response*/) {}, }; var amp = ''; for ( var i = 0; i < window.wpPostLikeCount.APIqueue.length; i++ ) { if ( i > 0 ) { amp = '&'; } batchRequest.data += amp + 'urls[]=' + window.wpPostLikeCount.APIqueue[ i ]; } window.wpPostLikeCount.request( batchRequest ); }, } ); } )( jQuery ); jQuery( document ).ready( function (/*$*/) { window.wpPostLikeCount.wpPostLikeCount(); } );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: webm010.cluster103.gra.hosting.ovh.net
Server IP: 10.103.20.10
PHP Version: 7.4.33
Server Software: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
HDD Total: 14.32 GB
HDD Free: 8.45 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
Exists
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: cuisinesj
User ID (UID): 17129
Group ID (GID): 100
Script Owner UID: 17129
Current Dir Owner: 17129