PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
← All changes | app/Modules/ProcessExteriorModule.php +19 -9 3.6.626.2.14 View file →
@@ -1,8 +1,11 @@
1 1 <?php
2 2
3 3 namespace FluentForm\App\Modules;
4 4
5 +defined('ABSPATH') or die;
6 +
7 +use FluentForm\App\Models\Form;
5 8 use FluentForm\App\Modules\Acl\Acl;
6 9
7 10 class ProcessExteriorModule
8 11 {
@@ -7,29 +10,36 @@
7 10 class ProcessExteriorModule
8 11 {
9 12 public function handleExteriorPages()
10 13 {
11 - if(defined('CT_VERSION')) {
14 + if (defined('CT_VERSION')) {
12 15 // oxygen page compatibility
13 - remove_action( 'wp_head', 'oxy_print_cached_css', 999999 );
16 + remove_action('wp_head', 'oxy_print_cached_css', 999999);
14 17 }
15 -
16 - $this->renderFormPreview(intval($_GET['preview_id']));
18 + wp_register_script(
19 + 'fluentform_editor_helper',
20 + fluentFormMix('js/fluent_forms_editor_helper.js'),
21 + array('jquery'),
22 + FLUENTFORM_VERSION,
23 + true
24 + );
25 + $this->renderFormPreview(intval(wpFluentForm('request')->get('preview_id')));
17 26 }
18 27
19 28 public function renderFormPreview($form_id)
20 29 {
21 30 if (Acl::hasAnyFormPermission($form_id)) {
22 - add_filter('fluentform_is_form_renderable', function ($renderable) {
31 + add_filter('fluentform/is_form_renderable', function ($renderable) {
23 32 $renderable['status'] = true;
24 33 return $renderable;
25 34 });
26 -
27 - $form = wpFluent()->table('fluentform_forms')->find($form_id);
35 +
36 + $form = Form::find($form_id);
28 37 if ($form) {
29 - echo \FluentForm\View::make('frameless.show_review', [
38 + wp_enqueue_script('fluentform_editor_helper');
39 + wpFluentForm('view')->render('frameless.show_preview', [
30 40 'form_id' => $form_id,
31 - 'form' => $form
41 + 'form' => $form,
32 42 ]);
33 43 exit();
34 44 }
35 45 }