@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @version 1.0 |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! defined( 'ABSPATH' ) ) { |
|
11 | +if ( ! defined('ABSPATH')) { |
|
12 | 12 | exit; // Exit if accessed directly. |
13 | 13 | } |
14 | 14 | |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @since 1.0 |
23 | 23 | */ |
24 | -do_action( 'give_before_main_content' ); |
|
24 | +do_action('give_before_main_content'); |
|
25 | 25 | |
26 | -while ( have_posts() ) : the_post(); |
|
26 | +while (have_posts()) : the_post(); |
|
27 | 27 | |
28 | - give_get_template_part( 'single-give-form/content', 'single-give-form' ); |
|
28 | + give_get_template_part('single-give-form/content', 'single-give-form'); |
|
29 | 29 | |
30 | 30 | endwhile; // end of the loop. |
31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @since 1.0 |
38 | 38 | */ |
39 | -do_action( 'give_after_main_content' ); |
|
39 | +do_action('give_after_main_content'); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Fires in single form template, on the sidebar. |
@@ -45,6 +45,6 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @since 1.0 |
47 | 47 | */ |
48 | -do_action( 'give_sidebar' ); |
|
48 | +do_action('give_sidebar'); |
|
49 | 49 | |
50 | 50 | get_footer(); |
51 | 51 | \ No newline at end of file |
@@ -71,7 +71,7 @@ |
||
71 | 71 | <?php |
72 | 72 | // Display View Receipt or |
73 | 73 | if ( 'publish' !== $post->post_status |
74 | - && 'subscription' !== $post->post_status |
|
74 | + && 'subscription' !== $post->post_status |
|
75 | 75 | ) : ?> |
76 | 76 | <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><span |
77 | 77 | class="give-donation-status <?php echo $post->post_status; ?>"><?php echo esc_html__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »'; ?></span></a> |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | */ |
5 | 5 | |
6 | 6 | // User's Donations |
7 | -if ( is_user_logged_in() ) { |
|
8 | - $donations = give_get_users_donations( get_current_user_id(), 20, true, 'any' ); |
|
9 | -} elseif ( Give()->email_access->token_exists ) { |
|
7 | +if (is_user_logged_in()) { |
|
8 | + $donations = give_get_users_donations(get_current_user_id(), 20, true, 'any'); |
|
9 | +} elseif (Give()->email_access->token_exists) { |
|
10 | 10 | // Email Access Token? |
11 | - $donations = give_get_users_donations( 0, 20, true, 'any' ); |
|
12 | -} elseif ( Give()->session->get_session_expiration() !== false ) { |
|
11 | + $donations = give_get_users_donations(0, 20, true, 'any'); |
|
12 | +} elseif (Give()->session->get_session_expiration() !== false) { |
|
13 | 13 | // Session active? |
14 | - $email = Give()->session->get( 'give_email' ); |
|
15 | - $donations = give_get_users_donations( $email, 20, true, 'any' ); |
|
14 | + $email = Give()->session->get('give_email'); |
|
15 | + $donations = give_get_users_donations($email, 20, true, 'any'); |
|
16 | 16 | } |
17 | 17 | |
18 | -if ( $donations ) : ?> |
|
18 | +if ($donations) : ?> |
|
19 | 19 | <table id="give_user_history" class="give-table"> |
20 | 20 | <thead> |
21 | 21 | <tr class="give-donation-row"> |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @since 1.7 |
29 | 29 | */ |
30 | - do_action( 'give_donation_history_header_before' ); |
|
30 | + do_action('give_donation_history_header_before'); |
|
31 | 31 | ?> |
32 | - <th scope="col" class="give-donation-id"><?php esc_html_e( 'ID', 'give' ); ?></th> |
|
33 | - <th scope="col" class="give-donation-date"><?php esc_html_e( 'Date', 'give' ); ?></th> |
|
34 | - <th scope="col" class="give-donation-amount"><?php esc_html_e( 'Amount', 'give' ); ?></th> |
|
35 | - <th scope="col" class="give-donation-details"><?php esc_html_e( 'Details', 'give' ); ?></th> |
|
32 | + <th scope="col" class="give-donation-id"><?php esc_html_e('ID', 'give'); ?></th> |
|
33 | + <th scope="col" class="give-donation-date"><?php esc_html_e('Date', 'give'); ?></th> |
|
34 | + <th scope="col" class="give-donation-amount"><?php esc_html_e('Amount', 'give'); ?></th> |
|
35 | + <th scope="col" class="give-donation-details"><?php esc_html_e('Details', 'give'); ?></th> |
|
36 | 36 | <?php |
37 | 37 | /** |
38 | 38 | * Fires in current user donation history table, after the header row ends. |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @since 1.7 |
43 | 43 | */ |
44 | - do_action( 'give_donation_history_header_after' ); |
|
44 | + do_action('give_donation_history_header_after'); |
|
45 | 45 | ?> |
46 | 46 | </tr> |
47 | 47 | </thead> |
48 | - <?php foreach ( $donations as $post ) : |
|
49 | - setup_postdata( $post ); |
|
50 | - $donation_data = give_get_payment_meta( $post->ID ); ?> |
|
48 | + <?php foreach ($donations as $post) : |
|
49 | + setup_postdata($post); |
|
50 | + $donation_data = give_get_payment_meta($post->ID); ?> |
|
51 | 51 | <tr class="give-donation-row"> |
52 | 52 | <?php |
53 | 53 | /** |
@@ -60,23 +60,23 @@ discard block |
||
60 | 60 | * @param int $post_id The ID of the post. |
61 | 61 | * @param mixed $donation_data Payment meta data. |
62 | 62 | */ |
63 | - do_action( 'give_donation_history_row_start', $post->ID, $donation_data ); |
|
63 | + do_action('give_donation_history_row_start', $post->ID, $donation_data); |
|
64 | 64 | ?> |
65 | - <td class="give-donation-id">#<?php echo give_get_payment_number( $post->ID ); ?></td> |
|
66 | - <td class="give-donation-date"><?php echo date_i18n( give_date_format(), strtotime( get_post_field( 'post_date', $post->ID ) ) ); ?></td> |
|
65 | + <td class="give-donation-id">#<?php echo give_get_payment_number($post->ID); ?></td> |
|
66 | + <td class="give-donation-date"><?php echo date_i18n(give_date_format(), strtotime(get_post_field('post_date', $post->ID))); ?></td> |
|
67 | 67 | <td class="give-donation-amount"> |
68 | - <span class="give-donation-amount"><?php echo give_currency_filter( give_format_amount( give_get_payment_amount( $post->ID ), array( 'sanitize' => false ) ) ); ?></span> |
|
68 | + <span class="give-donation-amount"><?php echo give_currency_filter(give_format_amount(give_get_payment_amount($post->ID), array('sanitize' => false))); ?></span> |
|
69 | 69 | </td> |
70 | 70 | <td class="give-donation-details"> |
71 | 71 | <?php |
72 | 72 | // Display View Receipt or |
73 | - if ( 'publish' !== $post->post_status |
|
73 | + if ('publish' !== $post->post_status |
|
74 | 74 | && 'subscription' !== $post->post_status |
75 | 75 | ) : ?> |
76 | - <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><span |
|
77 | - class="give-donation-status <?php echo $post->post_status; ?>"><?php echo esc_html__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »'; ?></span></a> |
|
76 | + <a href="<?php echo esc_url(add_query_arg('payment_key', give_get_payment_key($post->ID), give_get_history_page_uri())); ?>"><span |
|
77 | + class="give-donation-status <?php echo $post->post_status; ?>"><?php echo esc_html__('View', 'give').' '.give_get_payment_status($post, true).' »'; ?></span></a> |
|
78 | 78 | <?php else : ?> |
79 | - <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><?php esc_html_e( 'View Receipt »', 'give' ); ?></a> |
|
79 | + <a href="<?php echo esc_url(add_query_arg('payment_key', give_get_payment_key($post->ID), give_get_history_page_uri())); ?>"><?php esc_html_e('View Receipt »', 'give'); ?></a> |
|
80 | 80 | <?php endif; ?> |
81 | 81 | </td> |
82 | 82 | <?php |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param int $post_id The ID of the post. |
91 | 91 | * @param mixed $donation_data Payment meta data. |
92 | 92 | */ |
93 | - do_action( 'give_donation_history_row_end', $post->ID, $donation_data ); |
|
93 | + do_action('give_donation_history_row_end', $post->ID, $donation_data); |
|
94 | 94 | ?> |
95 | 95 | </tr> |
96 | 96 | <?php endforeach; ?> |
@@ -98,15 +98,15 @@ discard block |
||
98 | 98 | <div id="give-donation-history-pagination" class="give_pagination navigation"> |
99 | 99 | <?php |
100 | 100 | $big = 999999; |
101 | - echo paginate_links( array( |
|
102 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
101 | + echo paginate_links(array( |
|
102 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
103 | 103 | 'format' => '?paged=%#%', |
104 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
105 | - 'total' => ceil( give_count_donations_of_donor() / 20 ) // 20 items per page |
|
106 | - ) ); |
|
104 | + 'current' => max(1, get_query_var('paged')), |
|
105 | + 'total' => ceil(give_count_donations_of_donor() / 20) // 20 items per page |
|
106 | + )); |
|
107 | 107 | ?> |
108 | 108 | </div> |
109 | 109 | <?php wp_reset_postdata(); ?> |
110 | 110 | <?php else : ?> |
111 | - <?php Give()->notices->print_frontend_notice( esc_html__( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?> |
|
111 | + <?php Give()->notices->print_frontend_notice(esc_html__('It looks like you haven\'t made any donations.', 'give'), true, 'success'); ?> |
|
112 | 112 | <?php endif; |
@@ -75,8 +75,11 @@ discard block |
||
75 | 75 | ) : ?> |
76 | 76 | <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><span |
77 | 77 | class="give-donation-status <?php echo $post->post_status; ?>"><?php echo esc_html__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »'; ?></span></a> |
78 | - <?php else : ?> |
|
79 | - <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><?php esc_html_e( 'View Receipt »', 'give' ); ?></a> |
|
78 | + <?php else { |
|
79 | + : ?> |
|
80 | + <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); |
|
81 | +} |
|
82 | +?>"><?php esc_html_e( 'View Receipt »', 'give' ); ?></a> |
|
80 | 83 | <?php endif; ?> |
81 | 84 | </td> |
82 | 85 | <?php |
@@ -107,6 +110,9 @@ discard block |
||
107 | 110 | ?> |
108 | 111 | </div> |
109 | 112 | <?php wp_reset_postdata(); ?> |
110 | -<?php else : ?> |
|
111 | - <?php Give()->notices->print_frontend_notice( esc_html__( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?> |
|
113 | +<?php else { |
|
114 | + : ?> |
|
115 | + <?php Give()->notices->print_frontend_notice( esc_html__( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); |
|
116 | +} |
|
117 | +?> |
|
112 | 118 | <?php endif; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @since 1.0 |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; // Exit if accessed directly. |
15 | 15 | } |
16 | 16 | |
@@ -23,22 +23,22 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @since 1.0 |
25 | 25 | */ |
26 | -do_action( 'give_pre_featured_thumbnail' ); |
|
26 | +do_action('give_pre_featured_thumbnail'); |
|
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <div class="images"> |
30 | 30 | <?php //Featured Thumbnail |
31 | - if ( has_post_thumbnail() ) { |
|
31 | + if (has_post_thumbnail()) { |
|
32 | 32 | |
33 | - $image_size = give_get_option( 'featured_image_size' ); |
|
34 | - $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_give_form_large_thumbnail_size', ( ! empty( $image_size ) ? $image_size : 'large' ) ) ); |
|
33 | + $image_size = give_get_option('featured_image_size'); |
|
34 | + $image = get_the_post_thumbnail($post->ID, apply_filters('single_give_form_large_thumbnail_size', ( ! empty($image_size) ? $image_size : 'large'))); |
|
35 | 35 | |
36 | - echo apply_filters( 'single_give_form_image_html', $image ); |
|
36 | + echo apply_filters('single_give_form_image_html', $image); |
|
37 | 37 | |
38 | 38 | } else { |
39 | 39 | |
40 | 40 | //Placeholder Image |
41 | - echo apply_filters( 'single_give_form_image_html', sprintf( '<img src="%s" alt="%s" />', give_get_placeholder_img_src(), esc_attr__( 'Placeholder', 'give' ) ), $post->ID ); |
|
41 | + echo apply_filters('single_give_form_image_html', sprintf('<img src="%s" alt="%s" />', give_get_placeholder_img_src(), esc_attr__('Placeholder', 'give')), $post->ID); |
|
42 | 42 | |
43 | 43 | } ?> |
44 | 44 | </div> |
@@ -51,5 +51,5 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @since 1.0 |
53 | 53 | */ |
54 | -do_action( 'give_post_featured_thumbnail' ); |
|
54 | +do_action('give_post_featured_thumbnail'); |
|
55 | 55 | ?> |
@@ -11,9 +11,9 @@ |
||
11 | 11 | * @since 1.0 |
12 | 12 | */ |
13 | 13 | |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; // Exit if accessed directly. |
16 | 16 | } |
17 | -if ( is_active_sidebar( 'give-forms-sidebar' ) ) { |
|
18 | - dynamic_sidebar( 'give-forms-sidebar' ); |
|
17 | +if (is_active_sidebar('give-forms-sidebar')) { |
|
18 | + dynamic_sidebar('give-forms-sidebar'); |
|
19 | 19 | } |
20 | 20 | \ No newline at end of file |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @version 1.0 |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! defined( 'ABSPATH' ) ) { |
|
11 | +if ( ! defined('ABSPATH')) { |
|
12 | 12 | exit; // Exit if accessed directly. |
13 | 13 | } |
14 | 14 | |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @since 1.0 |
21 | 21 | */ |
22 | -do_action( 'give_before_single_form' ); |
|
22 | +do_action('give_before_single_form'); |
|
23 | 23 | |
24 | -if ( post_password_required() ) { |
|
24 | +if (post_password_required()) { |
|
25 | 25 | echo get_the_password_form(); |
26 | 26 | return; |
27 | 27 | } |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @since 1.0 |
39 | 39 | */ |
40 | - do_action( 'give_before_single_form_summary' ); |
|
40 | + do_action('give_before_single_form_summary'); |
|
41 | 41 | ?> |
42 | 42 | |
43 | - <div class="<?php echo apply_filters( 'give_forms_single_summary_classes', 'summary entry-summary' ); ?>"> |
|
43 | + <div class="<?php echo apply_filters('give_forms_single_summary_classes', 'summary entry-summary'); ?>"> |
|
44 | 44 | |
45 | 45 | <?php |
46 | 46 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @since 1.0 |
52 | 52 | */ |
53 | - do_action( 'give_single_form_summary' ); |
|
53 | + do_action('give_single_form_summary'); |
|
54 | 54 | ?> |
55 | 55 | |
56 | 56 | </div> |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @since 1.0 |
66 | 66 | */ |
67 | - do_action( 'give_after_single_form_summary' ); |
|
67 | + do_action('give_after_single_form_summary'); |
|
68 | 68 | ?> |
69 | 69 | |
70 | 70 | </div><!-- #give-form-<?php the_ID(); ?> --> |
@@ -77,5 +77,5 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @since 1.0 |
79 | 79 | */ |
80 | -do_action( 'give_after_single_form' ); |
|
80 | +do_action('give_after_single_form'); |
|
81 | 81 | ?> |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @since 1.0 |
12 | 12 | */ |
13 | 13 | |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; // Exit if accessed directly. |
16 | 16 | } ?> |
17 | 17 | <h1 itemprop="name" class="give-form-title entry-title"><?php the_title(); ?></h1> |
@@ -5,11 +5,11 @@ |
||
5 | 5 | ?> |
6 | 6 | <div id="give-payment-processing"> |
7 | 7 | <?php |
8 | - Give()->notices->print_frontend_notice( sprintf( |
|
8 | + Give()->notices->print_frontend_notice(sprintf( |
|
9 | 9 | /* translators: %s: success page URL */ |
10 | - __( 'Your donation is processing. This page will reload automatically in 8 seconds. If it does not, click <a href="%s">here</a>.', 'give' ), |
|
10 | + __('Your donation is processing. This page will reload automatically in 8 seconds. If it does not, click <a href="%s">here</a>.', 'give'), |
|
11 | 11 | give_get_success_page_uri() |
12 | - ), true, 'success' ); |
|
12 | + ), true, 'success'); |
|
13 | 13 | ?> |
14 | 14 | <span class="give-loading-animation"></span> |
15 | 15 | <script type="text/javascript">setTimeout(function () { |
@@ -6,13 +6,13 @@ |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly. |
|
10 | 10 | // This is the footer used if no others are available |
11 | 11 | ?> |
12 | 12 | <!DOCTYPE html> |
13 | 13 | <html> |
14 | 14 | <head> |
15 | 15 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
16 | - <title><?php echo get_bloginfo( 'name' ); ?></title> |
|
16 | + <title><?php echo get_bloginfo('name'); ?></title> |
|
17 | 17 | </head> |
18 | 18 | <body> |
19 | 19 | \ No newline at end of file |
@@ -6,7 +6,10 @@ |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
10 | + exit; |
|
11 | +} |
|
12 | +// Exit if accessed directly. |
|
10 | 13 | // This is the footer used if no others are available |
11 | 14 | ?> |
12 | 15 | <!DOCTYPE html> |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly. |
|
10 | 10 | |
11 | 11 | |
12 | 12 | // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | <table border="0" cellpadding="10" cellspacing="0" width="100%"> |
45 | 45 | <tr> |
46 | 46 | <td colspan="2" valign="middle" id="credit" style="<?php echo $credit; ?>"> |
47 | - <?php echo wpautop( wp_kses_post( wptexturize( apply_filters( 'give_email_footer_text', '<a href="' . esc_url( home_url() ) . '">' . get_bloginfo( 'name' ) . '</a>' ) ) ) ); ?> |
|
47 | + <?php echo wpautop(wp_kses_post(wptexturize(apply_filters('give_email_footer_text', '<a href="'.esc_url(home_url()).'">'.get_bloginfo('name').'</a>')))); ?> |
|
48 | 48 | </td> |
49 | 49 | </tr> |
50 | 50 | </table> |
@@ -6,7 +6,10 @@ |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
10 | + exit; |
|
11 | +} |
|
12 | +// Exit if accessed directly. |
|
10 | 13 | |
11 | 14 | |
12 | 15 | // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. |