| 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 |
*/ |
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
$campaign = $view_args['campaign']; |
| 19 |
$tag = $campaign->get_status_tag(); |
| 20 |
|
| 21 |
if ( empty( $tag ) ) { |
| 22 |
return; |
| 23 |
} |
| 24 |
|
| 25 |
?> |
| 26 |
<div class="campaign-status-tag campaign-status-tag-<?php echo esc_attr( strtolower( str_replace( ' ', '-', $campaign->get_status_key() ) ) ); ?>"> |
| 27 |
<?php echo $tag; ?> |
| 28 |
</div> |
| 29 |
|