X7ROOT File Manager
Current Path:
/home/katmhsmi/public_html/wp-content/plugins/fluentformpro/src/classes
home
/
katmhsmi
/
public_html
/
wp-content
/
plugins
/
fluentformpro
/
src
/
classes
/
📁
..
📄
.htaccess
(420 B)
📄
AddressAutoComplete.php
(4.49 KB)
📄
AdvancedFormValidation.php
(1.89 KB)
📄
Analytics.php
(3.35 KB)
📄
Calculation.php
(367 B)
📄
ConditionalContent.php
(1.97 KB)
📄
DoubleOptin.php
(17.79 KB)
📄
DraftSubmissionsManager.php
(8.53 KB)
📄
EntryEditor.php
(2.32 KB)
📄
FormModal.php
(1.65 KB)
📄
FormStyler.php
(8.8 KB)
📄
FormStylerGenerator.php
(22.17 KB)
📄
ProSmartCodes.php
(1.71 KB)
📄
ResendNotificationHandler.php
(10.46 KB)
📁
SharePage
📄
StepFormEntries.php
(13.38 KB)
📄
SurveyResultProcessor.php
(7.19 KB)
Editing: EntryEditor.php
<?php namespace FluentFormPro\classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } use FluentForm\App\Modules\Entries\Entries; class EntryEditor { public static function editEntry() { $entryId = intval($_REQUEST['entry_id']); $entryData = \json_decode(wp_unslash($_REQUEST['entry']), true); try { static::updateEntryResponse($entryId, $entryData); } catch (\Exception $exception) { wp_send_json_error([ 'message' => $exception->getMessage() ], 423); } wp_send_json_success([ 'message' => __('Entry data successfully updated', 'fluentformpro'), 'data' => $entryData ]); } public static function updateEntryResponse($id, $response) { // Find the database Entry First $entry = wpFluent()->table('fluentform_submissions') ->where('id', $id) ->first(); if (!$entry) { throw new \Exception('No Entry Found'); } $origianlResponse = json_decode($entry->response, true); $diffs = []; foreach ($response as $resKey => $resvalue) { if (!isset($origianlResponse[$resKey]) || $origianlResponse[$resKey] != $resvalue) { $diffs[$resKey] = $resvalue; } } if (!$diffs) { return true; } $response = wp_parse_args($response, $origianlResponse); wpFluent()->table('fluentform_submissions') ->where('id', $id) ->update([ 'response' => json_encode($response), 'updated_at' => current_time('mysql') ]); $entries = new Entries(); $entries->updateEntryDiffs($id, $entry->form_id, $diffs); $user = get_user_by('ID', get_current_user_id()); if ($user) { $message = 'Entry data has been updated by '.$user->user_login; } do_action('ff_log_data', [ 'parent_source_id' => $entry->form_id, 'source_type' => 'submission_item', 'source_id' => $entry->id, 'component' => 'EntryEditor', 'status' => 'info', 'title' => 'Entry Data Updated', 'description' => $message, ]); return true; } }
Upload File
Create Folder