| 1 |
<?php |
| 2 |
/** |
| 3 |
* Single Form Featured Image |
| 4 |
* |
| 5 |
* Displays the featured image for the single donation form - Override this template by copying it to yourtheme/give/single-give-form/featured-image.php |
| 6 |
* |
| 7 |
* @package Give/Templates |
| 8 |
* @copyright Copyright (c) 2016, GiveWP |
| 9 |
* @license https://opensource.org/licenses/gpl-license GNU Public License |
| 10 |
* @since 1.0 |
| 11 |
*/ |
| 12 |
|
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit; // Exit if accessed directly. |
| 15 |
} |
| 16 |
|
| 17 |
global $post; |
| 18 |
|
| 19 |
/** |
| 20 |
* Fires in single form template, before the form featured image. |
| 21 |
* |
| 22 |
* Allows you to add elements before the image. |
| 23 |
* |
| 24 |
* @since 1.0 |
| 25 |
*/ |
| 26 |
do_action( 'give_pre_featured_thumbnail' ); |
| 27 |
?> |
| 28 |
|
| 29 |
<div class="images"> |
| 30 |
<?php |
| 31 |
// Featured Thumbnail |
| 32 |
if ( has_post_thumbnail() ) { |
| 33 |
|
| 34 |
$image_size = give_get_option( 'featured_image_size' ); |
| 35 |
$image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_give_form_large_thumbnail_size', ( ! empty( $image_size ) ? $image_size : 'large' ) ) ); |
| 36 |
|
| 37 |
echo apply_filters( 'single_give_form_image_html', $image ); |
| 38 |
|
| 39 |
} else { |
| 40 |
|
| 41 |
// Placeholder Image |
| 42 |
echo apply_filters( 'single_give_form_image_html', sprintf( '<img src="%s" alt="%s" />', give_get_placeholder_img_src(), esc_attr__( 'Placeholder', 'give' ) ), $post->ID ); |
| 43 |
|
| 44 |
} |
| 45 |
?> |
| 46 |
</div> |
| 47 |
|
| 48 |
<?php |
| 49 |
/** |
| 50 |
* Fires in single form template, after the form featured image. |
| 51 |
* |
| 52 |
* Allows you to add elements after the image. |
| 53 |
* |
| 54 |
* @since 1.0 |
| 55 |
*/ |
| 56 |
do_action( 'give_post_featured_thumbnail' ); |
| 57 |
?> |
| 58 |
|