$60 GRAYBYTE WORDPRESS FILE MANAGER $11

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

/home/bravetechrwanda/itiministry.org/plugins/give/src/DonationForms/FormPage/

HOME
Current File : /home/bravetechrwanda/itiministry.org/plugins/give/src/DonationForms/FormPage//TemplateHandler.php
<?php

namespace Give\DonationForms\FormPage;

use Give\Helpers\Form\Utils;
use WP_Post as Post;

/**
 * @since 3.0.0
 */
class TemplateHandler
{
    /**
     * @var Post|null
     */
    private $post;

    /**
     * @var string
     */
    private $formPageTemplatePath;

    public function __construct( $post, string $formPageTemplatePath )
    {
        $this->post = $post;
        $this->formPageTemplatePath = $formPageTemplatePath;
    }

    /**
     * @since 3.20.0 Add earlier return for archive pages
     * @since 3.0.0
     */
    public function handle($template)
    {
        if (is_archive()) {
            return $template;
        }

        return $this->isNextGenForm()
            ? $this->formPageTemplatePath
            : $template;
    }

    /**
     * @since 3.0.3 Use isV3Form() method instead of 'post_content' to check if the form is built with Visual Builder
     * @since      3.0.0
     */
    protected function isNextGenForm(): bool
    {
        return $this->post
               && Utils::isV3Form($this->post->ID)
               && 'give_forms' === $this->post->post_type;
    }
}

Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
templates
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
TemplateHandler.php
1.097 KB
3 Feb 2025 8.13 PM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF