| Server IP : 195.130.67.5 / Your IP : 216.73.217.127 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/repository/wp-content/plugins/jetpack/sync/ |
Upload File : |
<?php
class Jetpack_Sync_Module_Stats extends Jetpack_Sync_Module {
function name() {
return 'stats';
}
function init_listeners( $callback ) {
add_action( 'jetpack_heartbeat', array( $this, 'sync_site_stats' ), 20 );
add_action( 'jetpack_sync_heartbeat_stats', $callback );
}
/*
* This namespaces the action that we sync.
* So that we can differentiate it from future actions.
*/
public function sync_site_stats() {
do_action( 'jetpack_sync_heartbeat_stats' );
}
public function init_before_send() {
add_filter( 'jetpack_sync_before_send_jetpack_sync_heartbeat_stats', array( $this, 'add_stats' ) );
}
public function add_stats() {
return array( Jetpack::get_stat_data( false, false ) );
}
}