@@ -6,18 +6,18 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | $show_form = true; |
9 | -$email = isset( $_POST['give_email'] ) ? $_POST['give_email'] : ''; |
|
9 | +$email = isset($_POST['give_email']) ? $_POST['give_email'] : ''; |
|
10 | 10 | |
11 | 11 | // reCAPTCHA |
12 | -$recaptcha_key = give_get_option( 'recaptcha_key' ); |
|
13 | -$recaptcha_secret = give_get_option( 'recaptcha_secret' ); |
|
14 | -$enable_recaptcha = ( ! empty( $recaptcha_key ) && ! empty( $recaptcha_secret ) ) ? true : false; |
|
12 | +$recaptcha_key = give_get_option('recaptcha_key'); |
|
13 | +$recaptcha_secret = give_get_option('recaptcha_secret'); |
|
14 | +$enable_recaptcha = ( ! empty($recaptcha_key) && ! empty($recaptcha_secret)) ? true : false; |
|
15 | 15 | |
16 | 16 | // Form submission |
17 | -if ( is_email( $email ) && wp_verify_nonce( $_POST['_wpnonce'], 'give' ) ) { |
|
17 | +if (is_email($email) && wp_verify_nonce($_POST['_wpnonce'], 'give')) { |
|
18 | 18 | |
19 | 19 | // Use reCAPTCHA |
20 | - if ( $enable_recaptcha ) { |
|
20 | + if ($enable_recaptcha) { |
|
21 | 21 | |
22 | 22 | $args = array( |
23 | 23 | 'secret' => $recaptcha_secret, |
@@ -25,70 +25,70 @@ discard block |
||
25 | 25 | 'remoteip' => $_POST['give_ip'], |
26 | 26 | ); |
27 | 27 | |
28 | - if ( ! empty( $args['response'] ) ) { |
|
29 | - $request = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array( |
|
28 | + if ( ! empty($args['response'])) { |
|
29 | + $request = wp_remote_post('https://www.google.com/recaptcha/api/siteverify', array( |
|
30 | 30 | 'body' => $args, |
31 | - ) ); |
|
32 | - if ( ! is_wp_error( $request ) || 200 == wp_remote_retrieve_response_code( $request ) ) { |
|
31 | + )); |
|
32 | + if ( ! is_wp_error($request) || 200 == wp_remote_retrieve_response_code($request)) { |
|
33 | 33 | |
34 | - $response = json_decode( $request['body'], true ); |
|
34 | + $response = json_decode($request['body'], true); |
|
35 | 35 | |
36 | 36 | // reCAPTCHA fail |
37 | - if ( ! $response['success'] ) { |
|
38 | - give_set_error( 'give_recaptcha_test_failed', apply_filters( 'give_recaptcha_test_failed_message', esc_html__( 'reCAPTCHA test failed.', 'give' ) ) ); |
|
37 | + if ( ! $response['success']) { |
|
38 | + give_set_error('give_recaptcha_test_failed', apply_filters('give_recaptcha_test_failed_message', esc_html__('reCAPTCHA test failed.', 'give'))); |
|
39 | 39 | } |
40 | 40 | } else { |
41 | 41 | |
42 | 42 | // Connection issue |
43 | - give_set_error( 'give_recaptcha_connection_issue', apply_filters( 'give_recaptcha_connection_issue_message', esc_html__( 'Unable to connect to reCAPTCHA server.', 'give' ) ) ); |
|
43 | + give_set_error('give_recaptcha_connection_issue', apply_filters('give_recaptcha_connection_issue_message', esc_html__('Unable to connect to reCAPTCHA server.', 'give'))); |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | } // End if(). |
47 | 47 | else { |
48 | 48 | |
49 | - give_set_error( 'give_recaptcha_failed', apply_filters( 'give_recaptcha_failed_message', esc_html__( 'It looks like the reCAPTCHA test has failed.', 'give' ) ) ); |
|
49 | + give_set_error('give_recaptcha_failed', apply_filters('give_recaptcha_failed_message', esc_html__('It looks like the reCAPTCHA test has failed.', 'give'))); |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | 54 | // If no errors or only expired token key error - then send email |
55 | - if ( ! give_get_errors() ) { |
|
55 | + if ( ! give_get_errors()) { |
|
56 | 56 | |
57 | - $donor = Give()->donors->get_donor_by( 'email', $email ); |
|
57 | + $donor = Give()->donors->get_donor_by('email', $email); |
|
58 | 58 | |
59 | - if ( isset( $donor->id ) ) { |
|
60 | - if ( Give()->email_access->can_send_email( $donor->id ) ) { |
|
61 | - Give()->email_access->send_email( $donor->id, $email ); |
|
59 | + if (isset($donor->id)) { |
|
60 | + if (Give()->email_access->can_send_email($donor->id)) { |
|
61 | + Give()->email_access->send_email($donor->id, $email); |
|
62 | 62 | $show_form = false; |
63 | 63 | } |
64 | 64 | } else { |
65 | - give_set_error( 'give_no_donor_email_exists', apply_filters( 'give_no_donor_email_exists_message', __( 'It looks like that donor email address does not exist.', 'give' ) ) ); |
|
65 | + give_set_error('give_no_donor_email_exists', apply_filters('give_no_donor_email_exists_message', __('It looks like that donor email address does not exist.', 'give'))); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | }// End if(). |
69 | 69 | |
70 | 70 | // Print any messages & errors |
71 | -Give()->notices->render_frontend_notices( 0 ); |
|
71 | +Give()->notices->render_frontend_notices(0); |
|
72 | 72 | |
73 | 73 | // Show the email login form? |
74 | -if ( $show_form ) { |
|
74 | +if ($show_form) { |
|
75 | 75 | ?> |
76 | 76 | |
77 | 77 | <div class="give-form"> |
78 | 78 | |
79 | 79 | <?php |
80 | - if ( ! give_get_errors() ) { |
|
81 | - Give()->notices->print_frontend_notice( apply_filters( 'give_email_access_message', __( 'Please enter the email address you used for your donation. A verification email containing an access link will be sent to you.', 'give' ) ), true ); |
|
80 | + if ( ! give_get_errors()) { |
|
81 | + Give()->notices->print_frontend_notice(apply_filters('give_email_access_message', __('Please enter the email address you used for your donation. A verification email containing an access link will be sent to you.', 'give')), true); |
|
82 | 82 | } ?> |
83 | 83 | |
84 | 84 | <form method="post" action="" id="give-email-access-form"> |
85 | - <label for="give-email"><?php esc_html__( 'Donation Email:', 'give' ); ?></label> |
|
86 | - <input id="give-email" type="email" name="give_email" value="" placeholder="<?php esc_attr_e( 'Your donation email', 'give' ); ?>"/> |
|
87 | - <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'give' ); ?>"/> |
|
85 | + <label for="give-email"><?php esc_html__('Donation Email:', 'give'); ?></label> |
|
86 | + <input id="give-email" type="email" name="give_email" value="" placeholder="<?php esc_attr_e('Your donation email', 'give'); ?>"/> |
|
87 | + <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('give'); ?>"/> |
|
88 | 88 | |
89 | 89 | <?php |
90 | 90 | // Enable reCAPTCHA? |
91 | - if ( $enable_recaptcha ) { ?> |
|
91 | + if ($enable_recaptcha) { ?> |
|
92 | 92 | |
93 | 93 | <script> |
94 | 94 | //IP verify for reCAPTCHA |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | <input type="hidden" name="give_ip" class="give_ip" value=""/> |
107 | 107 | <?php } ?> |
108 | 108 | |
109 | - <input type="submit" class="give-submit" value="<?php esc_attr_e( 'Email access token', 'give' ); ?>"/> |
|
109 | + <input type="submit" class="give-submit" value="<?php esc_attr_e('Email access token', 'give'); ?>"/> |
|
110 | 110 | </form> |
111 | 111 | </div> |
112 | 112 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | Give()->notices->print_frontend_notice( |
117 | 117 | sprintf( |
118 | 118 | /* translators: %s: user email address */ |
119 | - esc_html__( 'An email with an access link has been sent to %s.', 'give' ), |
|
119 | + esc_html__('An email with an access link has been sent to %s.', 'give'), |
|
120 | 120 | |
121 | 121 | ), |
122 | 122 | true, |
@@ -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 |
@@ -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; |
@@ -67,27 +67,27 @@ |
||
67 | 67 | <td class="give-donation-amount"> |
68 | 68 | <span class="give-donation-amount"> |
69 | 69 | <?php |
70 | - $donation_amount = give_currency_filter( give_format_amount( give_get_payment_amount( $post->ID ), array( 'sanitize' => false ) ) ); |
|
70 | + $donation_amount = give_currency_filter( give_format_amount( give_get_payment_amount( $post->ID ), array( 'sanitize' => false ) ) ); |
|
71 | 71 | |
72 | - /** |
|
73 | - * Filters the donation amount on Donation History Page. |
|
74 | - * |
|
75 | - * @param int $donation_amount Donation Amount. |
|
76 | - * @param int $post->ID Donation ID. |
|
77 | - * |
|
78 | - * @since 1.8.13 |
|
79 | - * |
|
80 | - * @return int |
|
81 | - */ |
|
82 | - echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID ); |
|
83 | - ?> |
|
72 | + /** |
|
73 | + * Filters the donation amount on Donation History Page. |
|
74 | + * |
|
75 | + * @param int $donation_amount Donation Amount. |
|
76 | + * @param int $post->ID Donation ID. |
|
77 | + * |
|
78 | + * @since 1.8.13 |
|
79 | + * |
|
80 | + * @return int |
|
81 | + */ |
|
82 | + echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID ); |
|
83 | + ?> |
|
84 | 84 | </span> |
85 | 85 | </td> |
86 | 86 | <td class="give-donation-details"> |
87 | 87 | <?php |
88 | 88 | // Display View Receipt or |
89 | 89 | if ( 'publish' !== $post->post_status |
90 | - && 'subscription' !== $post->post_status |
|
90 | + && 'subscription' !== $post->post_status |
|
91 | 91 | ) : ?> |
92 | 92 | <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><span |
93 | 93 | 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,14 +60,14 @@ 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 | 68 | <span class="give-donation-amount"> |
69 | 69 | <?php |
70 | - $donation_amount = give_currency_filter( give_format_amount( give_get_payment_amount( $post->ID ), array( 'sanitize' => false ) ) ); |
|
70 | + $donation_amount = give_currency_filter(give_format_amount(give_get_payment_amount($post->ID), array('sanitize' => false))); |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * Filters the donation amount on Donation History Page. |
@@ -79,20 +79,20 @@ discard block |
||
79 | 79 | * |
80 | 80 | * @return int |
81 | 81 | */ |
82 | - echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID ); |
|
82 | + echo apply_filters('give_donation_history_row_amount', $donation_amount, $post->ID); |
|
83 | 83 | ?> |
84 | 84 | </span> |
85 | 85 | </td> |
86 | 86 | <td class="give-donation-details"> |
87 | 87 | <?php |
88 | 88 | // Display View Receipt or |
89 | - if ( 'publish' !== $post->post_status |
|
89 | + if ('publish' !== $post->post_status |
|
90 | 90 | && 'subscription' !== $post->post_status |
91 | 91 | ) : ?> |
92 | - <a href="<?php echo esc_url( add_query_arg( 'payment_key', give_get_payment_key( $post->ID ), give_get_history_page_uri() ) ); ?>"><span |
|
93 | - class="give-donation-status <?php echo $post->post_status; ?>"><?php echo esc_html__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »'; ?></span></a> |
|
92 | + <a href="<?php echo esc_url(add_query_arg('payment_key', give_get_payment_key($post->ID), give_get_history_page_uri())); ?>"><span |
|
93 | + class="give-donation-status <?php echo $post->post_status; ?>"><?php echo esc_html__('View', 'give').' '.give_get_payment_status($post, true).' »'; ?></span></a> |
|
94 | 94 | <?php else : ?> |
95 | - <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> |
|
95 | + <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> |
|
96 | 96 | <?php endif; ?> |
97 | 97 | </td> |
98 | 98 | <?php |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @param int $post_id The ID of the post. |
107 | 107 | * @param mixed $donation_data Payment meta data. |
108 | 108 | */ |
109 | - do_action( 'give_donation_history_row_end', $post->ID, $donation_data ); |
|
109 | + do_action('give_donation_history_row_end', $post->ID, $donation_data); |
|
110 | 110 | ?> |
111 | 111 | </tr> |
112 | 112 | <?php endforeach; ?> |
@@ -114,15 +114,15 @@ discard block |
||
114 | 114 | <div id="give-donation-history-pagination" class="give_pagination navigation"> |
115 | 115 | <?php |
116 | 116 | $big = 999999; |
117 | - echo paginate_links( array( |
|
118 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
117 | + echo paginate_links(array( |
|
118 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
119 | 119 | 'format' => '?paged=%#%', |
120 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
121 | - 'total' => ceil( give_count_donations_of_donor() / 20 ) // 20 items per page |
|
122 | - ) ); |
|
120 | + 'current' => max(1, get_query_var('paged')), |
|
121 | + 'total' => ceil(give_count_donations_of_donor() / 20) // 20 items per page |
|
122 | + )); |
|
123 | 123 | ?> |
124 | 124 | </div> |
125 | 125 | <?php wp_reset_postdata(); ?> |
126 | 126 | <?php else : ?> |
127 | - <?php Give()->notices->print_frontend_notice( esc_html__( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?> |
|
127 | + <?php Give()->notices->print_frontend_notice(esc_html__('It looks like you haven\'t made any donations.', 'give'), true, 'success'); ?> |
|
128 | 128 | <?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> |