| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays onboarding message in the event of an empty list table. |
| 4 |
* |
| 5 |
* Available Variables: |
| 6 |
* |
| 7 |
* array $content { |
| 8 |
* string $image_url |
| 9 |
* string $image_alt |
| 10 |
* string $heading |
| 11 |
* string $message |
| 12 |
* string $cta_text |
| 13 |
* string $cta_link |
| 14 |
* string $help |
| 15 |
* } |
| 16 |
*/ |
| 17 |
?> |
| 18 |
|
| 19 |
<div class="give-blank-slate"> |
| 20 |
<?php if ( ! empty( $content['image_url'] ) ) : ?> |
| 21 |
<img class="give-blank-slate__image" src="<?php echo esc_url( $content['image_url'] ); ?>" alt="<?php echo esc_attr( $content['image_alt'] ); ?>"> |
| 22 |
<?php endif; ?> |
| 23 |
|
| 24 |
<?php if ( ! empty( $content['heading'] ) ) : ?> |
| 25 |
<h2 class="give-blank-slate__heading"><?php esc_html_e( $content['heading'], 'give' ); ?></h2> |
| 26 |
<?php endif; ?> |
| 27 |
|
| 28 |
<?php if ( ! empty( $content['message'] ) ) : ?> |
| 29 |
<p class="give-blank-slate__message"><?php esc_html_e( $content['message'], 'give' ); ?></p> |
| 30 |
<?php endif; ?> |
| 31 |
|
| 32 |
<?php if ( ! empty( $content['cta_text'] ) && ! empty( $content['cta_link'] ) ) : ?> |
| 33 |
<a class="give-blank-slate__cta button button-primary" href="<?php echo esc_url( $content['cta_link'] ); ?>"><?php esc_html_e( $content['cta_text'], 'give' ); ?></a> |
| 34 |
<?php endif; ?> |
| 35 |
|
| 36 |
<?php if ( ! empty( $content['help'] ) ) : ?> |
| 37 |
<p class="give-blank-slate__help"> |
| 38 |
<?php |
| 39 |
$allowed_html = array( |
| 40 |
'a' => array( |
| 41 |
'href' => array(), |
| 42 |
'title' => array(), |
| 43 |
'target' => array(), |
| 44 |
), |
| 45 |
'em' => array(), |
| 46 |
'strong' => array(), |
| 47 |
'code' => array(), |
| 48 |
); |
| 49 |
|
| 50 |
echo wp_kses( $content['help'], $allowed_html ); |
| 51 |
?> |
| 52 |
</p> |
| 53 |
<?php endif; ?> |
| 54 |
</div> |
| 55 |
|