| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | * @package Charitable/Templates/Donor |
| 8 | 8 | * @author WP Charitable LLC |
| 9 | 9 | * @since 1.5.0 |
| 10 | 10 | * @version 1.5.0 |
| 11 | + * @version 1.8.8.6 | |
| 11 | 12 | */ |
| 12 | 13 | |
| 13 | 14 | // Exit if accessed directly. |
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -20,12 +21,12 @@ | ||
| 20 | 21 | return; |
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | /* @var Charitable_Donor */ |
| 24 | -$donor = $view_args['donor']; | |
| 25 | +$charitable_donor = $view_args['donor']; | |
| 25 | 26 | |
| 26 | 27 | /* @var int */ |
| 27 | -$campaign_id = $view_args['campaign']; | |
| 28 | +$charitable_campaign_id = $view_args['campaign']; | |
| 28 | 29 | |
| 29 | 30 | ?> |
| 30 | 31 | <li class="donor"> |
| 31 | 32 | <?php |
| @@ -36,12 +37,12 @@ | ||
| 36 | 37 | * |
| 37 | 38 | * @param Charitable_Donor $donor The Donor object. |
| 38 | 39 | * @param array $view_args View arguments. |
| 39 | 40 | */ |
| 40 | - do_action( 'charitable_donor_loop_before_donor', $donor, $view_args ); | |
| 41 | + do_action( 'charitable_donor_loop_before_donor', $charitable_donor, $view_args ); | |
| 41 | 42 | |
| 42 | 43 | if ( $view_args['show_avatar'] ) : |
| 43 | - echo $donor->get_avatar(); | |
| 44 | + echo $charitable_donor->get_avatar(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 44 | 45 | endif; |
| 45 | 46 | |
| 46 | 47 | if ( $view_args['show_name'] ) : |
| 47 | 48 | ?> |
| @@ -54,15 +55,15 @@ | ||
| 54 | 55 | * |
| 55 | 56 | * @param string $name The name to be displayed. |
| 56 | 57 | * @param array $view_args View arguments. |
| 57 | 58 | */ |
| 58 | - echo apply_filters( 'charitable_donor_loop_donor_name', $donor->get_name(), $view_args ); | |
| 59 | + echo apply_filters( 'charitable_donor_loop_donor_name', $charitable_donor->get_name(), $view_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 59 | 60 | ?> |
| 60 | 61 | </p> |
| 61 | 62 | <?php |
| 62 | 63 | endif; |
| 63 | 64 | |
| 64 | - if ( $view_args['show_location'] && strlen( $donor->get_location() ) ) : | |
| 65 | + if ( $view_args['show_location'] && strlen( $charitable_donor->get_location() ) ) : | |
| 65 | 66 | ?> |
| 66 | 67 | <div class="donor-location"> |
| 67 | 68 | <?php |
| 68 | 69 | /** |
| @@ -72,9 +73,9 @@ | ||
| 72 | 73 | * |
| 73 | 74 | * @param string $location The location to be displayed. |
| 74 | 75 | * @param array $view_args View arguments. |
| 75 | 76 | */ |
| 76 | - echo apply_filters( 'charitable_donor_loop_donor_location', $donor->get_location(), $view_args ); | |
| 77 | + echo apply_filters( 'charitable_donor_loop_donor_location', $charitable_donor->get_location(), $view_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 77 | 78 | ?> |
| 78 | 79 | </div> |
| 79 | 80 | <?php |
| 80 | 81 | endif; |
| @@ -90,9 +91,9 @@ | ||
| 90 | 91 | * |
| 91 | 92 | * @param string $amount The amount to be displayed. |
| 92 | 93 | * @param array $view_args View arguments. |
| 93 | 94 | */ |
| 94 | - echo apply_filters( 'charitable_donor_loop_donor_amount', charitable_format_money( $donor->get_amount( $campaign_id ) ), $view_args ); | |
| 95 | + echo apply_filters( 'charitable_donor_loop_donor_amount', charitable_format_money( $charitable_donor->get_amount( $charitable_campaign_id ) ), $view_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 95 | 96 | ?> |
| 96 | 97 | </div> |
| 97 | 98 | <?php |
| 98 | 99 | endif; |
| @@ -104,7 +105,7 @@ | ||
| 104 | 105 | * |
| 105 | 106 | * @param Charitable_Donor $donor The Donor object. |
| 106 | 107 | * @param array $view_args View arguments. |
| 107 | 108 | */ |
| 108 | - do_action( 'charitable_donor_loop_after_donor', $donor, $view_args ); | |
| 109 | + do_action( 'charitable_donor_loop_after_donor', $charitable_donor, $view_args ); | |
| 109 | 110 | ?> |
| 110 | -</li><!-- .donor-<?php echo $donor->donor_id; ?> --> | |
| 111 | +</li><!-- .donor-<?php echo esc_attr( $charitable_donor->donor_id ); ?> --> | |