at path:
ROOT
/
wp-content
/
plugins
/
jetpack
/
class.jetpack-heartbeat.php
run:
R
W
Run
3rd-party
DIR
2026-04-17 06:07:54
R
W
Run
_inc
DIR
2026-04-17 06:07:56
R
W
Run
css
DIR
2026-04-17 06:07:54
R
W
Run
extensions
DIR
2026-04-17 06:07:53
R
W
Run
images
DIR
2026-04-17 06:07:55
R
W
Run
jetpack_vendor
DIR
2026-04-17 06:07:58
R
W
Run
json-endpoints
DIR
2026-04-17 06:07:59
R
W
Run
modules
DIR
2026-04-17 06:07:59
R
W
Run
sal
DIR
2026-04-17 06:07:59
R
W
Run
src
DIR
2026-04-17 06:07:59
R
W
Run
vendor
DIR
2026-04-17 06:07:59
R
W
Run
views
DIR
2026-04-17 06:07:54
R
W
Run
CHANGELOG.md
766.64 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
LICENSE.txt
18.2 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
SECURITY.md
2.45 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
class-jetpack-connection-status.php
728 By
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class-jetpack-gallery-settings.php
3.47 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class-jetpack-newsletter-dashboard-widget.php
436 By
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class-jetpack-pre-connection-jitms.php
2.34 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class-jetpack-stats-dashboard-widget.php
7.46 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class-jetpack-xmlrpc-methods.php
7.38 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.frame-nonce-preview.php
3.22 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-admin.php
21.09 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-autoupdate.php
9.93 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-cli.php
74.32 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-client-server.php
2.62 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-gutenberg.php
45.32 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-heartbeat.php
4.44 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-modules-list-table.php
14.81 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-network-sites-list-table.php
6.03 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-network.php
22.19 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-plan.php
4.09 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-post-images.php
11.72 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-twitter-cards.php
5.69 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack-user-agent.php
25.3 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.jetpack.php
204.86 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.json-api-endpoints.php
91.36 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.json-api.php
38.3 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
class.photon.php
1.74 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
composer.json
4.25 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
enhanced-open-graph.php
4.71 KB
2026-04-17 06:07:54
R
W
Run
Delete
Rename
functions.compat.php
4.34 KB
2026-04-17 06:07:55
R
W
Run
Delete
Rename
functions.cookies.php
2.04 KB
2026-04-17 06:07:55
R
W
Run
Delete
Rename
functions.global.php
13.91 KB
2026-04-17 06:07:55
R
W
Run
Delete
Rename
functions.is-mobile.php
2.47 KB
2026-04-17 06:07:55
R
W
Run
Delete
Rename
functions.opengraph.php
30.99 KB
2026-04-17 06:07:55
R
W
Run
Delete
Rename
functions.photon.php
3.04 KB
2026-04-17 06:07:55
R
W
Run
Delete
Rename
jetpack.php
8.92 KB
2026-04-17 06:07:56
R
W
Run
Delete
Rename
json-api-config.php
338 By
2026-04-17 06:07:58
R
W
Run
Delete
Rename
json-endpoints.php
6.92 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
load-jetpack.php
3.69 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
locales.php
371 By
2026-04-17 06:07:59
R
W
Run
Delete
Rename
readme.txt
33.15 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
unauth-file-upload.php
5.85 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
uninstall.php
1.65 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
wpml-config.xml
1.26 KB
2026-04-17 06:07:59
R
W
Run
Delete
Rename
error_log
up
📄
class.jetpack-heartbeat.php
Save
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Jetpack Heartbeat. * * @package automattic/jetpack */ use Automattic\Jetpack\Connection\Manager; use Automattic\Jetpack\Heartbeat; /** * Jetpack Heartbeat. */ class Jetpack_Heartbeat { /** * Holds the singleton instance of this class * * @since 2.3.3 * @var Jetpack_Heartbeat */ private static $instance = false; /** * Holds the singleton instance of the proxied class * * @since 8.9.0 * @var Automattic\Jetpack\Heartbeat */ private static $proxied_instance = false; /** * Singleton * * @since 2.3.3 * @static * @return Jetpack_Heartbeat */ public static function init() { if ( ! self::$instance ) { self::$instance = new Jetpack_Heartbeat(); self::$proxied_instance = Heartbeat::init(); } return self::$instance; } /** * Constructor for singleton * * @since 2.3.3 */ private function __construct() { add_filter( 'jetpack_heartbeat_stats_array', array( $this, 'add_stats_to_heartbeat' ) ); } /** * Generates heartbeat stats data. * * @param string $prefix Prefix to add before stats identifier. * * @return array The stats array. */ public static function generate_stats_array( $prefix = '' ) { $return = array(); $return[ "{$prefix}version" ] = JETPACK__VERSION; $return[ "{$prefix}wp-version" ] = get_bloginfo( 'version' ); $return[ "{$prefix}php-version" ] = PHP_VERSION; $return[ "{$prefix}branch" ] = (float) JETPACK__VERSION; $return[ "{$prefix}wp-branch" ] = (float) get_bloginfo( 'version' ); $return[ "{$prefix}php-branch" ] = (float) PHP_VERSION; $return[ "{$prefix}public" ] = Jetpack_Options::get_option( 'public' ); $return[ "{$prefix}ssl" ] = Jetpack::permit_ssl(); $return[ "{$prefix}is-https" ] = is_ssl() ? 'https' : 'http'; $return[ "{$prefix}language" ] = get_bloginfo( 'language' ); $return[ "{$prefix}charset" ] = get_bloginfo( 'charset' ); $return[ "{$prefix}is-multisite" ] = is_multisite() ? 'multisite' : 'singlesite'; $return[ "{$prefix}plugins" ] = implode( ',', Jetpack::get_active_plugins() ); if ( function_exists( 'get_mu_plugins' ) ) { $return[ "{$prefix}mu-plugins" ] = implode( ',', array_keys( get_mu_plugins() ) ); } $return[ "{$prefix}manage-enabled" ] = true; if ( function_exists( 'get_space_used' ) ) { // Only available in multisite. $space_used = get_space_used(); } else { // This is the same as `get_space_used`, except it does not apply the short-circuit filter. $upload_dir = wp_upload_dir(); $space_used = get_dirsize( $upload_dir['basedir'] ) / MB_IN_BYTES; } $return[ "{$prefix}space-used" ] = $space_used; $xmlrpc_errors = Jetpack_Options::get_option( 'xmlrpc_errors', array() ); if ( $xmlrpc_errors ) { $return[ "{$prefix}xmlrpc-errors" ] = implode( ',', array_keys( $xmlrpc_errors ) ); Jetpack_Options::delete_option( 'xmlrpc_errors' ); } // Missing the connection owner? $connection_manager = new Manager(); $return[ "{$prefix}missing-owner" ] = $connection_manager->is_missing_connection_owner(); // is-multi-network can have three values, `single-site`, `single-network`, and `multi-network`. $return[ "{$prefix}is-multi-network" ] = 'single-site'; if ( is_multisite() ) { $return[ "{$prefix}is-multi-network" ] = Jetpack::is_multi_network() ? 'multi-network' : 'single-network'; } if ( ! empty( $_SERVER['SERVER_ADDR'] ) || ! empty( $_SERVER['LOCAL_ADDR'] ) ) { $ip = ! empty( $_SERVER['SERVER_ADDR'] ) ? wp_unslash( $_SERVER['SERVER_ADDR'] ) : wp_unslash( $_SERVER['LOCAL_ADDR'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized just below. $ip_arr = array_map( 'intval', explode( '.', $ip ) ); if ( 4 === count( $ip_arr ) ) { $return[ "{$prefix}ip-2-octets" ] = implode( '.', array_slice( $ip_arr, 0, 2 ) ); } } foreach ( Jetpack::get_available_modules() as $slug ) { $return[ "{$prefix}module-{$slug}" ] = Jetpack::is_module_active( $slug ) ? 'on' : 'off'; } return $return; } /** * Add Jetpack Stats array to Heartbeat if Jetpack is connected * * @since 8.9.0 * * @param array $stats Jetpack Heartbeat stats. * @return array $stats */ public function add_stats_to_heartbeat( $stats ) { if ( ! Jetpack::is_connection_ready() ) { return $stats; } $jetpack_stats = self::generate_stats_array(); return array_merge( $stats, $jetpack_stats ); } }