PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
jetpack
/
vendor
/
automattic
/
jetpack-sync
/
src
/
modules
<?php /** * Stats sync module. * * @package automattic/jetpack-sync */ namespace Automattic\Jetpack\Sync\Modules; use Automattic\Jetpack\Heartbeat; /** * Class to handle sync for stats. */ class Stats extends Module { /** * Sync module name. * * @access public * * @return string */ public function name() { return 'stats'; } /** * Initialize stats action listeners. * * @access public * * @param callable $callback Action handler callable. */ public 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. * * @access public */ public function sync_site_stats() { do_action( 'jetpack_sync_heartbeat_stats' ); } /** * Initialize the module in the sender. * * @access public */ public function init_before_send() { add_filter( 'jetpack_sync_before_send_jetpack_sync_heartbeat_stats', array( $this, 'add_stats' ) ); } /** * Retrieve the stats data for the site. * * @access public * * @return array Stats data. */ public function add_stats() { return array( Heartbeat::generate_stats_array() ); } }
[-] class-options.php
[edit]
[-] class-module.php
[edit]
[-] class-import.php
[edit]
[-] class-full-sync.php
[edit]
[+]
..
[-] class-callables.php
[edit]
[-] class-protect.php
[edit]
[-] class-stats.php
[edit]
[-] class-meta.php
[edit]
[-] class-term-relationships.php
[edit]
[-] class-attachments.php
[edit]
[-] class-terms.php
[edit]
[-] class-plugins.php
[edit]
[-] class-posts.php
[edit]
[-] class-updates.php
[edit]
[-] class-wp-super-cache.php
[edit]
[-] class-woocommerce.php
[edit]
[-] class-comments.php
[edit]
[-] class-menus.php
[edit]
[-] class-users.php
[edit]
[-] class-full-sync-immediately.php
[edit]
[-] class-network-options.php
[edit]
[-] class-constants.php
[edit]
[-] class-themes.php
[edit]