lasso_post = new Lasso_Post( $post_id, $lasso_id ); $this->mode = $mode; } /** * Override post meta data of Elementor */ public function update_content() { $editor_data = $this->get_data(); // ? We need the `wp_slash` in order to avoid the unslashing during the `update_post_meta` $json_value = wp_slash( wp_json_encode( $editor_data ) ); update_metadata( 'post', $this->lasso_post->get_post_id(), $this->elementor_data_key, $json_value ); } /** * Get data * * @return array */ public function get_data() { return $this->lasso_post->get_json_meta( $this->elementor_data_key ); } }