| @@ -47,9 +47,10 @@ | ||
| 47 | 47 | ), |
| 48 | 48 | $value |
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | - give_set_error( 'give-limited-throttle', | |
| 51 | + give_set_error( | |
| 52 | + 'give-limited-throttle', | |
| 52 | 53 | $message |
| 53 | 54 | ); |
| 54 | 55 | } |
| 55 | 56 | |
| @@ -108,15 +109,17 @@ | ||
| 108 | 109 | do_action( 'give_donation_history_header_after' ); |
| 109 | 110 | ?> |
| 110 | 111 | </tr> |
| 111 | 112 | </thead> |
| 112 | - <?php foreach ( $donations as $post ) : | |
| 113 | + <?php | |
| 114 | + foreach ( $donations as $post ) : | |
| 113 | 115 | setup_postdata( $post ); |
| 114 | - $donation_data = give_get_payment_meta( $post->ID ); ?> | |
| 116 | + $donation_data = give_get_payment_meta( $post->ID ); | |
| 117 | + ?> | |
| 115 | 118 | <tr class="give-donation-row"> |
| 116 | 119 | <?php |
| 117 | 120 | /** |
| 118 | - * Fires in current user donation history table, before the row statrs. | |
| 121 | + * Fires in current user donation history table, before the row starts. | |
| 119 | 122 | * |
| 120 | 123 | * Allows you to add new <td> elements to the row, before other elements in the row. |
| 121 | 124 | * |
| 122 | 125 | * @since 1.7 |
| @@ -128,9 +131,10 @@ | ||
| 128 | 131 | |
| 129 | 132 | if ( filter_var( $donation_history_args['id'], FILTER_VALIDATE_BOOLEAN ) ) : |
| 130 | 133 | echo sprintf( |
| 131 | 134 | '<td class="give-donation-id"><span class="give-mobile-title">%2$s</span>%1$s</td>', |
| 132 | - give_get_payment_number( $post->ID ), esc_html( $table_headings['id'] ) | |
| 135 | + give_get_payment_number( $post->ID ), | |
| 136 | + esc_html( $table_headings['id'] ) | |
| 133 | 137 | ); |
| 134 | 138 | endif; |
| 135 | 139 | |
| 136 | 140 | if ( filter_var( $donation_history_args['date'], FILTER_VALIDATE_BOOLEAN ) ) : |
| @@ -135,9 +139,10 @@ | ||
| 135 | 139 | |
| 136 | 140 | if ( filter_var( $donation_history_args['date'], FILTER_VALIDATE_BOOLEAN ) ) : |
| 137 | 141 | echo sprintf( |
| 138 | 142 | '<td class="give-donation-date"><span class="give-mobile-title">%2$s</span>%1$s</td>', |
| 139 | - date_i18n( give_date_format(), strtotime( get_post_field( 'post_date', $post->ID ) ) ), esc_html( $table_headings['date'] ) | |
| 143 | + date_i18n( give_date_format(), strtotime( get_post_field( 'post_date', $post->ID ) ) ), | |
| 144 | + esc_html( $table_headings['date'] ) | |
| 140 | 145 | ); |
| 141 | 146 | endif; |
| 142 | 147 | |
| 143 | 148 | if ( filter_var( $donation_history_args['donor'], FILTER_VALIDATE_BOOLEAN ) ) : |
| @@ -142,9 +147,10 @@ | ||
| 142 | 147 | |
| 143 | 148 | if ( filter_var( $donation_history_args['donor'], FILTER_VALIDATE_BOOLEAN ) ) : |
| 144 | 149 | echo sprintf( |
| 145 | 150 | '<td class="give-donation-donor"><span class="give-mobile-title">%2$s</span>%1$s</td>', |
| 146 | - give_get_donor_name_by( $post->ID ), $table_headings['donor'] | |
| 151 | + esc_html( give_strip_shortcodes_deep( give_get_donor_name_by( $post->ID ) ) ), | |
| 152 | + esc_html( $table_headings['donor'] ) | |
| 147 | 153 | ); |
| 148 | 154 | endif; |
| 149 | 155 | ?> |
| 150 | 156 | |
| @@ -191,9 +197,9 @@ | ||
| 191 | 197 | ?> |
| 192 | 198 | <td class="give-donation-details"> |
| 193 | 199 | <?php |
| 194 | 200 | // Display View Receipt or. |
| 195 | - if ( 'publish' !== $post->post_status && 'subscription' !== $post->post_status ) : | |
| 201 | + if ( 'publish' !== $post->post_status && 'subscription' !== $post->post_status ) : | |
| 196 | 202 | echo sprintf( |
| 197 | 203 | '<span class="give-mobile-title">%4$s</span><a href="%1$s"><span class="give-donation-status %2$s">%3$s</span></a>', |
| 198 | 204 | esc_url( |
| 199 | 205 | add_query_arg( |
| @@ -198,9 +204,9 @@ | ||
| 198 | 204 | esc_url( |
| 199 | 205 | add_query_arg( |
| 200 | 206 | 'donation_id', |
| 201 | 207 | $post->ID, |
| 202 | - give_get_history_page_uri() | |
| 208 | + $_SERVER['REQUEST_URI'] | |
| 203 | 209 | ) |
| 204 | 210 | ), |
| 205 | 211 | $post->post_status, |
| 206 | 212 | __( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »', |
| @@ -213,10 +219,10 @@ | ||
| 213 | 219 | esc_url( |
| 214 | 220 | add_query_arg( |
| 215 | 221 | 'donation_id', |
| 216 | 222 | $post->ID, |
| 217 | - give_get_history_page_uri() | |
| 218 | - ) | |
| 223 | + $_SERVER['REQUEST_URI'] | |
| 224 | + ) | |
| 219 | 225 | ), |
| 220 | 226 | __( 'View Receipt »', 'give' ), |
| 221 | 227 | esc_html( $table_headings['details'] ) |
| 222 | 228 | ); |
| @@ -253,17 +259,20 @@ | ||
| 253 | 259 | </table> |
| 254 | 260 | <div id="give-donation-history-pagination" class="give_pagination navigation"> |
| 255 | 261 | <?php |
| 256 | 262 | $big = 999999; |
| 257 | - echo paginate_links( array( | |
| 258 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
| 259 | - 'format' => '?paged=%#%', | |
| 260 | - 'current' => max( 1, get_query_var( 'paged' ) ), | |
| 261 | - 'total' => ceil( give_count_donations_of_donor() / 20 ), // 20 items per page | |
| 262 | - ) ); | |
| 263 | + echo paginate_links( | |
| 264 | + array( | |
| 265 | + 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
| 266 | + 'format' => '?paged=%#%', | |
| 267 | + 'current' => max( 1, get_query_var( 'paged' ) ), | |
| 268 | + 'total' => ceil( give_count_donations_of_donor() / 20 ), // 20 items per page | |
| 269 | + ) | |
| 270 | + ); | |
| 263 | 271 | ?> |
| 264 | 272 | </div> |
| 265 | 273 | </div> |
| 266 | 274 | <?php wp_reset_postdata(); ?> |
| 267 | 275 | <?php else : ?> |
| 268 | - <?php Give()->notices->print_frontend_notice( __( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?> | |
| 269 | -<?php endif; | |
| 276 | + <?php Give_Notices::print_frontend_notice( __( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?> | |
| 277 | + <?php | |
| 278 | +endif; | |