| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* @since 4.16.4 Escaped the introduction headline output. |
| 5 |
* @since 4.16.2 Escape introduction image URL when rendering the template. |
| 6 |
*/ |
| 7 |
|
| 8 |
use Give\Helpers\Form\Template\Utils\Frontend as FrontendFormTemplateUtils; |
| 9 |
|
| 10 |
$formInfo = get_post(FrontendFormTemplateUtils::getFormId()); |
| 11 |
|
| 12 |
/* @var \Give\Form\Template $formTemplate */ |
| 13 |
$formTemplate = Give()->templates->getTemplate(); |
| 14 |
|
| 15 |
// Get headline and description |
| 16 |
$headline = $formTemplate->getFormHeading($formInfo->ID); |
| 17 |
$description = $formTemplate->getFormExcerpt($formInfo->ID); |
| 18 |
$image = $formTemplate->getFormFeaturedImage($formInfo->ID); |
| 19 |
?> |
| 20 |
|
| 21 |
<div class="give-section introduction"> |
| 22 |
<h2 class="headline"> |
| 23 |
<?php |
| 24 |
echo esc_html($headline); ?> |
| 25 |
</h2> |
| 26 |
<?php |
| 27 |
if ( ! empty($description)) : ?> |
| 28 |
<div class="seperator"></div> |
| 29 |
<p class="description"> |
| 30 |
<?php |
| 31 |
echo $description; ?> |
| 32 |
</p> |
| 33 |
<?php |
| 34 |
endif; ?> |
| 35 |
<?php |
| 36 |
if ( ! empty($image)) : ?> |
| 37 |
<div class="image"> |
| 38 |
<img src="<?php echo esc_url( $image ); ?>" /> |
| 39 |
</div> |
| 40 |
<?php |
| 41 |
endif; ?> |
| 42 |
|
| 43 |
<?php |
| 44 |
require 'income-stats.php'; |
| 45 |
require 'progress-bar.php'; |
| 46 |
?> |
| 47 |
|