| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* The template used to display error messages. |
| 10 |
* |
| 11 |
* @author WP Charitable LLC |
| 12 |
* @since 1.0.0 |
| 13 |
* @version 1.5.0 |
| 14 |
* @package Charitable/Templates/Form Fields |
| 15 |
*/ |
| 16 |
|
| 17 |
if ( ! array_key_exists( 'errors', $view_args ) || empty( $view_args['errors'] ) ) { |
| 18 |
return; |
| 19 |
} |
| 20 |
|
| 21 |
?> |
| 22 |
<div class="charitable-form-errors charitable-notice"> |
| 23 |
<ul class="errors"> |
| 24 |
<?php foreach ( $view_args['errors'] as $error ) : // phpcs:ignore ?> |
| 25 |
<li><?php echo $error; // phpcs:ignore ?></li> |
| 26 |
<?php endforeach ?> |
| 27 |
</ul> |
| 28 |
</div> |
| 29 |
|