| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | * @return array Heartbeat response received. |
| 33 | 33 | */ |
| 34 | 34 | public function heartbeat_received( $response, $data ) { |
| 35 | 35 | if ( isset( $data['elementor_post_lock']['post_ID'] ) ) { |
| 36 | - $post_id = $data['elementor_post_lock']['post_ID']; | |
| 36 | + $post_id = $data['elementor_post_lock']['post_ID']; | |
| 37 | 37 | $locked_user = Plugin::$instance->editor->get_locked_user( $post_id ); |
| 38 | 38 | |
| 39 | 39 | if ( ! $locked_user || ! empty( $data['elementor_force_post_lock'] ) ) { |
| 40 | 40 | Plugin::$instance->editor->lock_post( $post_id ); |
| @@ -41,25 +41,13 @@ | ||
| 41 | 41 | } else { |
| 42 | 42 | $response['locked_user'] = $locked_user->display_name; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if ( array_key_exists( 'elementor_has_unsaved', $data ) ) { | |
| 46 | - do_action( 'elementor/heartbeat/unsaved_signal', $post_id, $data['elementor_has_unsaved'] ); | |
| 47 | - } | |
| 48 | - | |
| 49 | - $mutation_marker = apply_filters( 'elementor/heartbeat/mutation_marker', null, $post_id ); | |
| 50 | - if ( $mutation_marker ) { | |
| 51 | - $response['elementor_mcp_mutation'] = $mutation_marker; | |
| 52 | - } | |
| 53 | - | |
| 54 | - $response['elementor_server_time'] = time(); | |
| 55 | - | |
| 56 | 45 | /** @var Core\Common\Modules\Ajax\Module $ajax */ |
| 57 | 46 | $ajax = Plugin::$instance->common->get_component( 'ajax' ); |
| 58 | 47 | |
| 59 | 48 | $response['elementorNonce'] = $ajax->create_nonce(); |
| 60 | 49 | } |
| 61 | - | |
| 62 | 50 | return $response; |
| 63 | 51 | } |
| 64 | 52 | |
| 65 | 53 | /** |