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.214.226
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/blocks/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/blocks/utils/index.js
/**
 * WordPress dependencies
 */
import {__} from '@wordpress/i18n';

/**
 * getSiteUrl from API root
 * @returns {string} siteurl
 */
export function getSiteUrl() {
    return wpApiSettings.root.replace('/wp-json/', '');
}

/**
 * Convert forms object in option
 *
 * @since 2.7.0
 *
 * @param {object} forms
 *
 * @return {[]}
 */
export function getFormOptions(forms) {
    let formOptions = [];

    if (forms) {
        formOptions = forms.map(({id, title: {rendered: title}}) => {
            return {
                value: id,
                label: title === '' ? `${id} : ${__('No form title', 'give')}` : title,
            };
        });
    }

    // Add Default option
    formOptions.unshift({value: '0', label: __('-- Select Form --', 'give')});

    return formOptions;
}

/**
 * Returns whether or not the given form uses the legacy form template.
 *
 * Note: if selected form has legacy form template or empty (old forms) then it will return true otherwise false.
 *
 * @since 2.30.0 Filter v3 forms out of the form list.
 * @since 2.7.0
 *
 * @param {object} forms
 * @param {number} SelectedFormId
 *
 * @return {boolean}
 */
export function isLegacyForm(forms, SelectedFormId) {
    if (forms) {
        const data = forms.find((form) => parseInt(form.id) === parseInt(SelectedFormId));

        return (
            data && data.excerpt.rendered !== '<p>[]</p>\n' && (!data.formTemplate || data.formTemplate === 'legacy')
        );
    }

    return false;
}

Youez - 2016 - github.com/yon3zu
LinuXploit