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

52 lines 1.1 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\Framework\Foundation\Application;
7
8 class Settings
9 {
10 /**
11 * @var \FluentForm\Framework\Foundation\Application
12 */
13 protected $app;
14
15 /**
16 * GlobalSettings constructor.
17 *
18 * @param \FluentForm\Framework\Foundation\Application $app
19 */
20 public function __construct(Application $app)
21 {
22 $this->app = $app;
23 }
24
25 /**
26 * Render the page for native global settings components
27 *
28 * @throws \Exception
29 */
30 public function render()
31 {
32 $this->enqueue();
33
34 $this->app->view->render('admin.settings.settings');
35 }
36
37 /**
38 * Enqueue necessary resources.
39 *
40 * @throws \Exception
41 */
42 public function enqueue()
43 {
44 wp_enqueue_script('fluentform-global-settings-js');
45
46 wp_localize_script('fluentform-global-settings-js', 'FluentFormApp', [
47 'plugin' => $this->app->getSlug(),
48 'akismet_activated' => AkismetHandler::isPluginEnabled()
49 ]);
50 }
51 }
52