| @@ -6,9 +6,10 @@ | ||
| 6 | 6 | * |
| 7 | 7 | * @author WP Charitable LLC |
| 8 | 8 | * @package Charitable/Templates/Campaign |
| 9 | 9 | * @since 1.0.0 |
| 10 | - * @version 1.6.29 | |
| 10 | + * @version 1.8.1.12 | |
| 11 | + * @version 1.8.8.6 | |
| 11 | 12 | */ |
| 12 | 13 | |
| 13 | 14 | // Exit if accessed directly. |
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -14,20 +15,25 @@ | ||
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 15 | 16 | exit; |
| 16 | 17 | } |
| 17 | 18 | |
| 18 | -/* @var Charitable_Campaign */ | |
| 19 | -$campaign = $view_args['campaign']; | |
| 19 | +$charitable_campaign = $view_args['campaign']; | |
| 20 | 20 | |
| 21 | -if ( ! $campaign->can_receive_donations() ) : | |
| 21 | +if ( ! $charitable_campaign->can_receive_donations() ) : | |
| 22 | 22 | return; |
| 23 | 23 | endif; |
| 24 | 24 | |
| 25 | +$charitable_button_label = apply_filters( 'charitable_campaign_loop_donate_button_label', esc_html__( 'Donate', 'charitable' ), $charitable_campaign ); | |
| 26 | + | |
| 25 | 27 | ?> |
| 26 | -<div class="campaign-donation"> | |
| 28 | +<div class="<?php echo esc_attr( apply_filters( 'charitable_campaign_loop_donate_link_div_css', 'campaign-donation', $charitable_campaign ) ); ?>"> | |
| 27 | 29 | <a class="<?php echo esc_attr( charitable_get_button_class( 'donate' ) ); ?>" |
| 28 | - href="<?php echo charitable_get_permalink( 'campaign_donation_page', array( 'campaign_id' => $campaign->ID ) ); ?>" | |
| 29 | - aria-label="<?php echo esc_attr( sprintf( _x( 'Make a donation to %s', 'make a donation to campaign', 'charitable' ), get_the_title( $campaign->ID ) ) ); ?>" | |
| 30 | - > | |
| 31 | - <?php _e( 'Donate', 'charitable' ); ?> | |
| 30 | + href="<?php echo charitable_get_permalink( 'campaign_donation_page', array( 'campaign_id' => $charitable_campaign->ID ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" | |
| 31 | + aria-label=" | |
| 32 | + <?php | |
| 33 | + /* translators: %s: Campaign title */ | |
| 34 | + echo esc_attr( sprintf( _x( 'Make a donation to %s', 'make a donation to campaign', 'charitable' ), get_the_title( $charitable_campaign->ID ) ) ); | |
| 35 | + ?> | |
| 36 | + "> | |
| 37 | + <?php echo esc_html( $charitable_button_label ); ?> | |
| 32 | 38 | </a> |
| 33 | 39 | </div> |