← Back
Editing: introduction.php
<?php /** * @since 4.19.1 Escape output. * @since 4.16.4 Escaped the introduction headline output. * @since 4.16.2 Escape introduction image URL when rendering the template. */ use Give\Helpers\Form\Template\Utils\Frontend as FrontendFormTemplateUtils; if (!defined('ABSPATH')) { exit; } // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables; this file is included inside a function, so they are not globals. $formInfo = get_post(FrontendFormTemplateUtils::getFormId()); /* @var \Give\Form\Template $formTemplate */ $formTemplate = Give()->templates->getTemplate(); // Get headline and description $headline = $formTemplate->getFormHeading($formInfo->ID); $description = $formTemplate->getFormExcerpt($formInfo->ID); $image = $formTemplate->getFormFeaturedImage($formInfo->ID); ?> <div class="give-section introduction"> <h2 class="headline"> <?php echo esc_html($headline); ?> </h2> <?php if ( ! empty($description)) : ?> <div class="seperator"></div> <p class="description"> <?php echo wp_kses_post($description); ?> </p> <?php endif; ?> <?php if ( ! empty($image)) : ?> <div class="image"> <img src="<?php echo esc_url( $image ); ?>" /> </div> <?php endif; ?> <?php require 'income-stats.php'; require 'progress-bar.php'; ?>
Save File
Cancel