| @@ -1,5 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 3 | +// Exit if accessed directly. | |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | + exit; | |
| 6 | +} | |
| 7 | + | |
| 2 | 8 | /** |
| 3 | 9 | * The template used to display notices. |
| 4 | 10 | * |
| 5 | 11 | * @author WP Charitable LLC |
| @@ -5,8 +11,9 @@ | ||
| 5 | 11 | * @author WP Charitable LLC |
| 6 | 12 | * @package Charitable/Templates/Form Fields |
| 7 | 13 | * @since 1.0.0 |
| 8 | 14 | * @version 1.3.0 |
| 15 | + * @version 1.8.8.6 | |
| 9 | 16 | */ |
| 10 | 17 | |
| 11 | 18 | if ( ! isset( $view_args['notices'] ) ) { |
| 12 | 19 | return; |
| @@ -11,23 +18,23 @@ | ||
| 11 | 18 | if ( ! isset( $view_args['notices'] ) ) { |
| 12 | 19 | return; |
| 13 | 20 | } |
| 14 | 21 | |
| 15 | -$notices = array_filter( $view_args['notices'] ); | |
| 22 | +$charitable_notices = array_filter( $view_args['notices'] ); | |
| 16 | 23 | |
| 17 | -if ( empty( $notices ) ) { | |
| 24 | +if ( empty( $charitable_notices ) ) { | |
| 18 | 25 | return; |
| 19 | 26 | } |
| 20 | 27 | |
| 21 | -foreach ( $notices as $type => $messages ) : | |
| 22 | - if ( 'error' == $type ) : | |
| 23 | - $type = 'errors'; | |
| 28 | +foreach ( $charitable_notices as $type => $messages ) : // phpcs:ignore | |
| 29 | + if ( 'error' == $type ) : // phpcs:ignore | |
| 30 | + $type = 'errors'; // phpcs:ignore | |
| 24 | 31 | endif; |
| 25 | 32 | ?> |
| 26 | 33 | <div class="charitable-notice charitable-form-<?php echo esc_attr( $type ); ?>"> |
| 27 | 34 | <ul class="charitable-notice-<?php echo esc_attr( $type ); ?> <?php echo esc_attr( $type ); ?>"> |
| 28 | - <?php foreach ( $messages as $message ) : ?> | |
| 29 | - <li><?php echo $message; ?></li> | |
| 35 | + <?php foreach ( $messages as $charitable_message ) : ?> | |
| 36 | + <li><?php echo $charitable_message; // phpcs:ignore ?></li> | |
| 30 | 37 | <?php endforeach ?> |
| 31 | 38 | </ul><!-- charitable-notice-<?php esc_attr( $type ); ?> --> |
| 32 | 39 | </div><!-- .charitable-notices --> |
| 33 | 40 | <?php endforeach ?> |