PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / trunk
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder vtrunk
6.2.15 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 All 197 releases
fluentform / app / Modules / Widgets / OxygenWidget.php

OxygenWidget.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder trunk, at app/Modules/Widgets/OxygenWidget.php

51 lines 1.4 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\Widgets;
4
5 defined('ABSPATH') or die;
6
7 if (!class_exists('OxyEl')) {
8 return;
9 }
10
11 class OxygenWidget
12 {
13 public function __construct()
14 {
15 if (version_compare(CT_VERSION, '3.2', '<')) {
16 return; //minimum version requirement
17 }
18 add_action('plugins_loaded', [$this, 'initOxygenEl']);
19 add_action('oxygen_add_plus_sections', [$this, 'addAccordionSection']);
20 add_action('oxygen_add_plus_fluentform_section_content', [$this, 'registerAddPlusSubsections']);
21 $this->initWidgets();
22 }
23
24 public function initOxygenEl()
25 {
26 if (!class_exists('OxyEl')) {
27 return;
28 }
29 new OxygenEl();
30 }
31
32 public function initWidgets()
33 {
34 if (file_exists(FLUENTFORM_DIR_PATH . 'app/Modules/Widgets/OxyFluentFormWidget.php')) {
35 require_once FLUENTFORM_DIR_PATH . 'app/Modules/Widgets/OxyFluentFormWidget.php';
36 }
37 }
38
39 public function addAccordionSection()
40 {
41 $brand_name = __('Fluent Forms', 'fluentform');
42 \CT_Toolbar::oxygen_add_plus_accordion_section('fluentform', $brand_name);
43 }
44
45 public function registerAddPlusSubsections()
46 {
47 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- oxygen_add_plus_fluentform_form is a third-party plugin hook (Oxygen Builder)
48 do_action('oxygen_add_plus_fluentform_form');
49 }
50 }
51