| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays the donate button to be displayed on campaign pages. |
| 4 |
* |
| 5 |
* Override this template by copying it to yourtheme/charitable/campaign/donate-link.php |
| 6 |
* |
| 7 |
* @author Studio 164a |
| 8 |
* @package Charitable/Templates/Campaign |
| 9 |
* @since 1.0.0 |
| 10 |
* @version 1.5.0 |
| 11 |
*/ |
| 12 |
|
| 13 |
if ( ! array_key_exists( 'campaign', $view_args ) || ! is_a( $view_args['campaign'], 'Charitable_Campaign' ) ) : |
| 14 |
return; |
| 15 |
endif; |
| 16 |
|
| 17 |
$campaign = $view_args['campaign']; |
| 18 |
|
| 19 |
if ( ! $campaign->can_receive_donations() ) : |
| 20 |
return; |
| 21 |
endif; |
| 22 |
|
| 23 |
?> |
| 24 |
<div class="campaign-donation"> |
| 25 |
<?php /* translators: %s: campaign name */ ?> |
| 26 |
<a class="donate-button button" href="#charitable-donation-form" aria-label="<?php echo esc_attr( sprintf( _x( 'Make a donation to %s', 'make a donation to campaign', 'charitable' ), get_the_title( $campaign->ID ) ) ); ?>"><?php _e( 'Donate', 'charitable' ); ?></a> |
| 27 |
</div> |
| 28 |
|