PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 5.2.9
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v5.2.9
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 5.2.9, at app/Modules/Renderer/GlobalSettings/Settings.php

59 lines 1.5 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\Modules\Form\AkismetHandler;
6 use FluentForm\App\Modules\Form\CleanTalkHandler;
7 use FluentForm\App\Modules\Registerer\TranslationString;
8 use FluentForm\Framework\Foundation\Application;
9
10 class Settings
11 {
12 /**
13 * App instance
14 *
15 * @var \FluentForm\Framework\Foundation\Application
16 */
17 protected $app;
18
19 /**
20 * GlobalSettings constructor.
21 *
22 * @param \FluentForm\Framework\Foundation\Application $app
23 */
24 public function __construct(Application $app)
25 {
26 $this->app = $app;
27 }
28
29 /**
30 * Render the page for native global settings components
31 *
32 * @throws \Exception
33 */
34 public function render()
35 {
36 $this->enqueue();
37
38 $this->app->view->render('admin.globalSettings.settings');
39 }
40
41 /**
42 * Enqueue necessary resources.
43 *
44 * @throws \Exception
45 */
46 public function enqueue()
47 {
48 wp_enqueue_script('fluentform-global-settings-js');
49
50 wp_localize_script('fluentform-global-settings-js', 'FluentFormApp', [
51 'plugin' => $this->app->config->get('app.slug'),
52 'akismet_activated' => AkismetHandler::isPluginEnabled(),
53 'cleantalk_activated' => CleanTalkHandler::isPluginEnabled(),
54 'has_pro' => defined('FLUENTFORMPRO'),
55 'form_settings_str' => TranslationString::getGlobalSettingsI18n()
56 ]);
57 }
58 }
59