Uname: Linux p3plzcpnl499967.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software: Apache
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 208.109.40.231
Your Ip: 216.73.216.26
User: nayff91c5tsx (10005085) | Group: nayff91c5tsx (10005085)
Safe Mode: OFF
Disable Function:
NONE

name : OxygenWidget.php
<?php

namespace FluentForm\App\Modules\Widgets;

if (!class_exists('OxyEl')) {
    return;
}

class OxygenWidget
{
    public function __construct()
    {
        if (version_compare(CT_VERSION, '3.2', '<')) {
            return; //minimum version requirement
        }
        add_action('plugins_loaded', [$this, 'initOxygenEl']);
        add_action('oxygen_add_plus_sections', [$this, 'addAccordionSection']);
        add_action('oxygen_add_plus_fluentform_section_content', [$this, 'registerAddPlusSubsections']);
        $this->initWidgets();
    }

    public function initOxygenEl()
    {
        if (!class_exists('OxyEl')) {
            return;
        }
        new OxygenEl();
    }

    public function initWidgets()
    {
        if (file_exists(FLUENTFORM_DIR_PATH . 'app/Modules/Widgets/OxyFluentFormWidget.php')) {
            require_once FLUENTFORM_DIR_PATH . 'app/Modules/Widgets/OxyFluentFormWidget.php';
        }
    }

    public function addAccordionSection()
    {
        $brand_name = __('Fluent Forms', 'fluentform');
        \CT_Toolbar::oxygen_add_plus_accordion_section('fluentform', $brand_name);
    }

    public function registerAddPlusSubsections()
    {
        // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- oxygen_add_plus_fluentform_form is a third-party plugin hook (Oxygen Builder)
        do_action('oxygen_add_plus_fluentform_form');
    }
}
© 2026 GrazzMean