$41 GRAYBYTE WORDPRESS FILE MANAGER $13

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravrvjk/itiministry.org/wp-content/plugins/give/src/Promotions/BFCM/

HOME
Current File : /home/bravrvjk/itiministry.org/wp-content/plugins/give/src/Promotions/BFCM//BFCM2025.php
<?php

namespace Give\Promotions\BFCM;

use DateTimeImmutable;
use Give\Framework\Views\View;
use Give\Vendors\StellarWP\AdminNotices\AdminNotice;
use Give\Vendors\StellarWP\AdminNotices\AdminNotices;
use Give\Vendors\StellarWP\AdminNotices\DataTransferObjects\NoticeElementProperties;

/**
 * @since 4.11.0
 */
class BFCM2025
{
    /**
     * @var string
     */
    public $id = 'givewp-bfcm-2025';

    /**
     * @var string
     */
    private const START_DATE = '2025-11-24 00:00:00';

    /**
     * @var string
     */
    private const END_DATE   = '2025-12-02 23:59:59';

    /**
     * @since 4.11.0
     */
    public function __invoke()
    {
        $this->render();
    }

    /**
     * @since 4.11.0
     */
    public function render()
    {
        [$start, $end] = $this->getDateRange();

        AdminNotices::show($this->id, [$this, 'renderCallback'])
            ->custom()
            ->location('inline')
            ->enqueueStylesheet(GIVE_PLUGIN_URL . 'build/bfcm2025.css', [], '1.0.0')
            ->enqueueScript(GIVE_PLUGIN_URL . 'build/bfcm2025.js', [], '1.0.0')
            ->between($start, $end)
            ->on('give-campaigns')
            ->on('give-donors')
            ->on('give-payment-history')
            ->on('give-settings')
            ->on('give-add-ons')
            ->on('give-reports');
    }

    /**
     * @since 4.11.0
     */
    private function getDateRange(): array
    {
        $timezone = wp_timezone();

        return [
            new DateTimeImmutable(self::START_DATE, $timezone),
            new DateTimeImmutable(self::END_DATE, $timezone),
        ];
    }

    /**
     * @since 4.11.0
     */
    public function renderCallback(AdminNotice $notice, NoticeElementProperties $elements): string
    {
        $backgroundLarge = GIVE_PLUGIN_URL . 'build/assets/dist/images/admin/promotions/bfcm-banner/2025/bfcm-background-lg.svg';
        $backgroundMedium = GIVE_PLUGIN_URL . 'build/assets/dist/images/admin/promotions/bfcm-banner/2025/bfcm-background-md.svg';
        $backgroundSmall = GIVE_PLUGIN_URL . 'build/assets/dist/images/admin/promotions/bfcm-banner/2025/bfcm-background-sm.svg';
        $cartIcon = GIVE_PLUGIN_URL . 'build/assets/dist/images/admin/promotions/bfcm-banner/2025/bfcm-cart-icon.svg';

        return View::load(
            'Promotions.BFCM2025',
            [
                'elements'         => $elements,
                'backgroundLarge'    => $backgroundLarge,
                'backgroundMedium' => $backgroundMedium,
                'backgroundSmall' => $backgroundSmall,
                'cartIcon'         => $cartIcon,
            ],
            false
        );
    }
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
resources
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
BFCM2025.php
2.616 KB
16 Oct 2025 6.10 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF