PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
← All changes | templates/history-donations.php +40 -31 2.3.0 → 4.17.0 View file →
@@ -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
@@ -127,24 +130,27 @@
127 130 do_action( 'give_donation_history_row_start', $post->ID, $donation_data );
128 131
129 132 if ( filter_var( $donation_history_args['id'], FILTER_VALIDATE_BOOLEAN ) ) :
130 133 echo sprintf(
131 - '<td class="give-donation-id"><span class="title-for-mobile">%2$s</span>%1$s</td>',
132 - give_get_payment_number( $post->ID ), esc_html( $table_headings['id'] )
134 + '<td class="give-donation-id"><span class="give-mobile-title">%2$s</span>%1$s</td>',
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 ) ) :
137 141 echo sprintf(
138 - '<td class="give-donation-date"><span class="title-for-mobile">%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'] )
142 + '<td class="give-donation-date"><span class="give-mobile-title">%2$s</span>%1$s</td>',
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 ) ) :
144 149 echo sprintf(
145 - '<td class="give-donation-donor"><span class="title-for-mobile">%2$s</span>%1$s</td>',
146 - give_get_donor_name_by( $post->ID ), $table_headings['donor']
150 + '<td class="give-donation-donor"><span class="give-mobile-title">%2$s</span>%1$s</td>',
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
@@ -149,9 +155,9 @@
149 155 ?>
150 156
151 157 <?php if ( filter_var( $donation_history_args['amount'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
152 158 <td class="give-donation-amount">
153 - <?php printf( '<span class="title-for-mobile">%1$s</span>', esc_html( $table_headings['amount'] ) ); ?>
159 + <?php printf( '<span class="give-mobile-title">%1$s</span>', esc_html( $table_headings['amount'] ) ); ?>
154 160 <span class="give-donation-amount">
155 161 <?php
156 162 $currency_code = give_get_payment_currency_code( $post->ID );
157 163 $donation_amount = give_donation_amount( $post->ID, true );
@@ -174,9 +180,9 @@
174 180
175 181 <?php
176 182 if ( filter_var( $donation_history_args['status'], FILTER_VALIDATE_BOOLEAN ) ) :
177 183 echo sprintf(
178 - '<td class="give-donation-status"><span class="title-for-mobile">%2$s</span>%1$s</td>',
184 + '<td class="give-donation-status"><span class="give-mobile-title">%2$s</span>%1$s</td>',
179 185 give_get_payment_status( $post, true ),
180 186 esc_html( $table_headings['status'] )
181 187 );
182 188 endif;
@@ -182,9 +188,9 @@
182 188 endif;
183 189
184 190 if ( filter_var( $donation_history_args['payment_method'], FILTER_VALIDATE_BOOLEAN ) ) :
185 191 echo sprintf(
186 - '<td class="give-donation-payment-method"><span class="title-for-mobile">%2$s</span>%1$s</td>',
192 + '<td class="give-donation-payment-method"><span class="give-mobile-title">%2$s</span>%1$s</td>',
187 193 give_get_gateway_checkout_label( give_get_payment_gateway( $post->ID ) ),
188 194 esc_html( $table_headings['payment_method'] )
189 195 );
190 196 endif;
@@ -191,16 +197,16 @@
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 - '<span class="title-for-mobile">%4$s</span><a href="%1$s"><span class="give-donation-status %2$s">%3$s</span></a>',
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(
200 - 'payment_key',
201 - give_get_payment_key( $post->ID ),
202 - give_get_history_page_uri()
206 + 'donation_id',
207 + $post->ID,
208 + $_SERVER['REQUEST_URI']
203 209 )
204 210 ),
205 211 $post->post_status,
206 212 __( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' &raquo;',
@@ -208,15 +214,15 @@
208 214 );
209 215
210 216 else :
211 217 echo sprintf(
212 - '<span class="title-for-mobile">%3$s</span><a href="%1$s">%2$s</a>',
218 + '<span class="give-mobile-title">%3$s</span><a href="%1$s">%2$s</a>',
213 219 esc_url(
214 220 add_query_arg(
215 - 'payment_key',
216 - give_get_payment_key( $post->ID ),
217 - give_get_history_page_uri()
218 - )
221 + 'donation_id',
222 + $post->ID,
223 + $_SERVER['REQUEST_URI']
224 + )
219 225 ),
220 226 __( 'View Receipt &raquo;', '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;