PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.7.0.9
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.7.0.9
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / templates / donation-receipt / not-authorized.php

not-authorized.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.7.0.9, at templates/donation-receipt/not-authorized.php

47 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Displays the notice to say that the user cannot access the donation receipt.
4 *
5 * Override this template by copying it to yourtheme/charitable/donation-receipt/not-authorized.php
6 *
7 * @author WP Charitable LLC
8 * @package Charitable/Templates/Donation Receipt
9 * @since 1.1.2
10 * @version 1.6.27
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 $content = $view_args['content'];
19
20 if ( is_user_logged_in() ) : ?>
21 <div class="charitable-notice">
22 <?php _e( 'You do not have access to this donation receipt.', 'charitable' ); ?>
23 </div>
24 <?php else : ?>
25 <div class="charitable-notice">
26 <?php
27 _e( 'You must be logged in to access your donation receipt.', 'charitable' );
28
29 /* Display any other notices. */
30 charitable_template( 'form-fields/notices.php', array( 'notices' => charitable_get_notices()->get_notices() ) );
31
32 /**
33 * Unhook the default template notices function from showing, as it would
34 * result in another <noscript> element being created inside of this one.
35 *
36 * @see https://github.com/Charitable/Charitable/issues/715
37 */
38 remove_action( 'charitable_login_form_before', 'charitable_template_notices', 10, 0 );
39 ?>
40 </div>
41 <?php
42 echo Charitable_Login_Shortcode::display( array( 'redirect' => charitable_get_current_url() ) );
43
44 /* Turn the login form notices hook back on. */
45 add_action( 'charitable_login_form_before', 'charitable_template_notices', 10, 0 );
46 endif;
47