| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays the campaign status tag. |
| 4 |
* |
| 5 |
* Override this template by copying it to yourtheme/charitable/campaign/status-tag.php |
| 6 |
* |
| 7 |
* @author WP Charitable LLC |
| 8 |
* @package Charitable/Templates/Campaign Page |
| 9 |
* @since 1.0.0 |
| 10 |
* @version 1.0.0 |
| 11 |
* @version 1.8.8.6 |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
$charitable_campaign = $view_args['campaign']; |
| 20 |
$charitable_tag = $charitable_campaign->get_status_tag(); // phpcs:ignore |
| 21 |
|
| 22 |
if ( empty( $charitable_tag ) ) { |
| 23 |
return; |
| 24 |
} |
| 25 |
|
| 26 |
?> |
| 27 |
<div class="campaign-status-tag campaign-status-tag-<?php echo esc_attr( strtolower( str_replace( ' ', '-', $charitable_campaign->get_status_key() ) ) ); ?>"> |
| 28 |
<?php echo esc_html( $charitable_tag ); ?> |
| 29 |
</div> |
| 30 |
|