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 | includes/admin/payments/payments-history.php +14 -12 2.3.2 → 4.17.0 View file →
@@ -6,9 +6,9 @@
6 6 * @subpackage Admin/Payments
7 7 * @copyright Copyright (c) 2016, GiveWP
8 8 * @license https://opensource.org/licenses/gpl-license GNU Public License
9 9 * @since 1.0
10 -*/
10 + */
11 11
12 12 // Exit if accessed directly.
13 13 if ( ! defined( 'ABSPATH' ) ) {
14 14 exit;
@@ -21,9 +21,9 @@
21 21 *
22 22 * @access private
23 23 * @since 1.0
24 24 * @return void
25 -*/
25 + */
26 26 function give_payment_history_page() {
27 27 if ( isset( $_GET['view'] ) && 'view-payment-details' == $_GET['view'] ) {
28 28 require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/view-payment-details.php';
29 29 } else {
@@ -29,9 +29,9 @@
29 29 } else {
30 30 require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/class-payments-table.php';
31 31 $payments_table = new Give_Payment_History_Table();
32 32 $payments_table->prepare_items();
33 - ?>
33 + ?>
34 34 <div class="wrap">
35 35
36 36 <h1 class="wp-heading-inline"><?php echo get_admin_page_title(); ?></h1>
37 37
@@ -47,9 +47,9 @@
47 47
48 48 <form id="give-payments-advanced-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history' ); ?>">
49 49 <input type="hidden" name="post_type" value="give_forms" />
50 50 <input type="hidden" name="page" value="give-payment-history" />
51 - <?php $payments_table->views() ?>
51 + <?php $payments_table->views(); ?>
52 52 <?php $payments_table->advanced_filters(); ?>
53 53 </form>
54 54
55 55 <form id="give-payments-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history' ); ?>">
@@ -73,9 +73,9 @@
73 73 do_action( 'give_payments_page_bottom' );
74 74 ?>
75 75
76 76 </div>
77 -<?php
77 + <?php
78 78 }
79 79 }
80 80
81 81 /**
@@ -92,15 +92,15 @@
92 92 if ( 'give_forms_page_give-payment-history' != get_current_screen()->base ) {
93 93 return $admin_title;
94 94 }
95 95
96 - if( ! isset( $_GET['give-action'] ) ) {
96 + if ( ! isset( $_GET['give-action'] ) ) {
97 97 return $admin_title;
98 98 }
99 99
100 - switch( $_GET['give-action'] ) :
100 + switch ( $_GET['give-action'] ) :
101 101
102 - case 'view-payment-details' :
102 + case 'view-payment-details':
103 103 $title = sprintf(
104 104 /* translators: %s: admin title */
105 105 esc_html__( 'View Donation Details - %s', 'give' ),
106 106 $admin_title
@@ -105,9 +105,9 @@
105 105 esc_html__( 'View Donation Details - %s', 'give' ),
106 106 $admin_title
107 107 );
108 108 break;
109 - case 'edit-payment' :
109 + case 'edit-payment':
110 110 $title = sprintf(
111 111 /* translators: %s: admin title */
112 112 esc_html__( 'Edit Donation - %s', 'give' ),
113 113 $admin_title
@@ -130,18 +130,20 @@
130 130 * @param $url
131 131 * @param $post_id
132 132 * @param $context
133 133 * @return string
134 + *
135 + * @since 2.12.0 default value for the $post_id parameter is removed to prevent PHP8 warnings.
134 136 */
135 -function give_override_edit_post_for_payment_link( $url, $post_id = 0, $context ) {
137 +function give_override_edit_post_for_payment_link( $url, $post_id, $context ) {
136 138
137 139 $post = get_post( $post_id );
138 140
139 - if( ! $post ) {
141 + if ( ! $post ) {
140 142 return $url;
141 143 }
142 144
143 - if( 'give_payment' != $post->post_type ) {
145 + if ( 'give_payment' != $post->post_type ) {
144 146 return $url;
145 147 }
146 148
147 149 $url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $post_id );