| 1 |
<?php |
| 2 |
/** |
| 3 |
* Donation form view. |
| 4 |
* |
| 5 |
* @since 2.7.0 |
| 6 |
*/ |
| 7 |
use Give\Views\IframeContentView; |
| 8 |
use Give\Helpers\Form\Template\Utils\Frontend as FrontendFormTemplateUtils; |
| 9 |
|
| 10 |
$formId = FrontendFormTemplateUtils::getFormId(); |
| 11 |
$iframeView = new IframeContentView(); |
| 12 |
|
| 13 |
// Fetch the Give Form. |
| 14 |
ob_start(); |
| 15 |
give_get_donation_form( [ 'id' => $formId ] ); |
| 16 |
|
| 17 |
echo $iframeView->setTitle( get_post_field( 'post_title', $formId ) ) |
| 18 |
->setBody( ob_get_clean() ) |
| 19 |
->render(); |
| 20 |
|