PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.3
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.3
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
fluentform / app / Modules / Renderer / GlobalSettings / Settings.php

Settings.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.3, at app/Modules/Renderer/GlobalSettings/Settings.php

66 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules\Renderer\GlobalSettings;
4
5 use FluentForm\App\Helpers\Helper;
6 use FluentForm\App\Modules\Form\AkismetHandler;
7 use FluentForm\App\Modules\Form\CleanTalkHandler;
8 use FluentForm\App\Modules\Registerer\TranslationString;
9 use FluentForm\Framework\Foundation\Application;
10
11 class Settings
12 {
13 /**
14 * App instance
15 *
16 * @var \FluentForm\Framework\Foundation\Application
17 */
18 protected $app;
19
20 /**
21 * GlobalSettings constructor.
22 *
23 * @param \FluentForm\Framework\Foundation\Application $app
24 */
25 public function __construct(Application $app)
26 {
27 $this->app = $app;
28 }
29
30 /**
31 * Render the page for native global settings components
32 *
33 * @throws \Exception
34 */
35 public function render()
36 {
37 $this->enqueue();
38
39 $this->app->view->render('admin.globalSettings.settings');
40 }
41
42 /**
43 * Enqueue necessary resources.
44 *
45 * @throws \Exception
46 */
47 public function enqueue()
48 {
49 wp_enqueue_script('fluentform-global-settings-js');
50
51 $globalSettingAppData = [
52 'plugin' => $this->app->config->get('app.slug'),
53 'akismet_activated' => AkismetHandler::isPluginEnabled(),
54 'cleantalk_activated' => CleanTalkHandler::isPluginEnabled(),
55 'has_pro' => Helper::hasPro(),
56 'is_payment_compatible' => Helper::isPaymentCompatible(),
57 'form_settings_str' => TranslationString::getGlobalSettingsI18n(),
58 'ace_path_url' => fluentformMix('libs/ace'),
59 ];
60 if (Helper::isPaymentCompatible()) {
61 $globalSettingAppData = apply_filters('fluentform/global_settings_component_settings_data', $globalSettingAppData);
62 }
63 wp_localize_script('fluentform-global-settings-js', 'FluentFormApp', $globalSettingAppData);
64 }
65 }
66