@@ -71,8 +71,8 @@ |
||
71 | 71 | |
72 | 72 | case 'user_id' : |
73 | 73 | return '<a href="' . |
74 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . ( ! empty( $item['user_id'] ) ? urlencode( $item['user_id'] ) : give_get_payment_user_email( $item['payment_id'] ) ) ) . |
|
75 | - '">' . $item['user_name'] . '</a>'; |
|
74 | + admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . ( ! empty( $item['user_id'] ) ? urlencode( $item['user_id'] ) : give_get_payment_user_email( $item['payment_id'] ) ) ) . |
|
75 | + '">' . $item['user_name'] . '</a>'; |
|
76 | 76 | |
77 | 77 | case 'amount' : |
78 | 78 | return give_currency_filter( give_format_amount( $item['amount'] ) ); |
@@ -97,10 +97,10 @@ |
||
97 | 97 | |
98 | 98 | //Single Form settings varies compared to the Global default settings |
99 | 99 | if ( ! empty( $form_default ) && |
100 | - $form_id !== null && |
|
101 | - $default !== $form_default && |
|
102 | - $form_default !== 'global' && |
|
103 | - give_is_gateway_active( $form_default ) |
|
100 | + $form_id !== null && |
|
101 | + $default !== $form_default && |
|
102 | + $form_default !== 'global' && |
|
103 | + give_is_gateway_active( $form_default ) |
|
104 | 104 | ) { |
105 | 105 | $default = $form_default; |
106 | 106 | } |
@@ -117,8 +117,8 @@ |
||
117 | 117 | $shortcode_button_pages = array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ); |
118 | 118 | // Only run in admin post/page creation and edit screens |
119 | 119 | if ( in_array( $pagenow, $shortcode_button_pages ) |
120 | - && apply_filters( 'give_shortcode_button_condition', true ) |
|
121 | - && ! empty( self::$shortcodes ) |
|
120 | + && apply_filters( 'give_shortcode_button_condition', true ) |
|
121 | + && ! empty( self::$shortcodes ) |
|
122 | 122 | ) { |
123 | 123 | |
124 | 124 | $shortcodes = array(); |
@@ -115,8 +115,8 @@ |
||
115 | 115 | |
116 | 116 | case 'num_purchases' : |
117 | 117 | $value = '<a href="' . |
118 | - admin_url( '/edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
119 | - ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
118 | + admin_url( '/edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
119 | + ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
120 | 120 | break; |
121 | 121 | |
122 | 122 | case 'amount_spent' : |
@@ -71,9 +71,9 @@ |
||
71 | 71 | ) ); |
72 | 72 | |
73 | 73 | add_role( 'give_accountant', __( 'Give Accountant', 'give' ), array( |
74 | - 'read' => true, |
|
75 | - 'edit_posts' => false, |
|
76 | - 'delete_posts' => false |
|
74 | + 'read' => true, |
|
75 | + 'edit_posts' => false, |
|
76 | + 'delete_posts' => false |
|
77 | 77 | ) ); |
78 | 78 | |
79 | 79 | add_role( 'give_worker', __( 'Give Worker', 'give' ), array( |
@@ -727,10 +727,10 @@ discard block |
||
727 | 727 | } |
728 | 728 | |
729 | 729 | if ( ! is_int( $params[1] ) |
730 | - && ! is_float( $params[1] ) |
|
731 | - && ! is_string( $params[1] ) |
|
732 | - && $params[1] !== null |
|
733 | - && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) |
|
730 | + && ! is_float( $params[1] ) |
|
731 | + && ! is_string( $params[1] ) |
|
732 | + && $params[1] !== null |
|
733 | + && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) |
|
734 | 734 | ) { |
735 | 735 | trigger_error( 'array_column(): The column key should be either a string or an integer', E_USER_WARNING ); |
736 | 736 | |
@@ -738,10 +738,10 @@ discard block |
||
738 | 738 | } |
739 | 739 | |
740 | 740 | if ( isset( $params[2] ) |
741 | - && ! is_int( $params[2] ) |
|
742 | - && ! is_float( $params[2] ) |
|
743 | - && ! is_string( $params[2] ) |
|
744 | - && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) |
|
741 | + && ! is_int( $params[2] ) |
|
742 | + && ! is_float( $params[2] ) |
|
743 | + && ! is_string( $params[2] ) |
|
744 | + && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) |
|
745 | 745 | ) { |
746 | 746 | trigger_error( 'array_column(): The index key should be either a string or an integer', E_USER_WARNING ); |
747 | 747 |
@@ -115,8 +115,8 @@ |
||
115 | 115 | |
116 | 116 | case 'num_purchases' : |
117 | 117 | $value = '<a href="' . |
118 | - admin_url( '/edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
119 | - ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
118 | + admin_url( '/edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
119 | + ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
120 | 120 | break; |
121 | 121 | |
122 | 122 | case 'amount_spent' : |
@@ -188,8 +188,8 @@ |
||
188 | 188 | |
189 | 189 | $payment_ids = implode( ',', $payment_ids ); |
190 | 190 | $customer->update( array( 'payment_ids' => $payment_ids, |
191 | - 'purchase_count' => $purchase_count, |
|
192 | - 'purchase_value' => $pending_total |
|
191 | + 'purchase_count' => $purchase_count, |
|
192 | + 'purchase_value' => $pending_total |
|
193 | 193 | ) ); |
194 | 194 | |
195 | 195 | $this->done = true; |
@@ -33,20 +33,20 @@ discard block |
||
33 | 33 | $login_redirect = add_query_arg('give-login-success', 'true', give_get_current_page_url()); |
34 | 34 | } |
35 | 35 | |
36 | - if ( empty( $logout_redirect ) ) { |
|
37 | - $logout_redirect = add_query_arg( 'give-logout-success', 'true', give_get_current_page_url() ); |
|
38 | - } |
|
36 | + if ( empty( $logout_redirect ) ) { |
|
37 | + $logout_redirect = add_query_arg( 'give-logout-success', 'true', give_get_current_page_url() ); |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | - // Add user_logout action to logout url. |
|
42 | - $logout_redirect = add_query_arg( |
|
43 | - array( |
|
44 | - 'give_action' => 'user_logout', |
|
45 | - 'give_logout_nonce' => wp_create_nonce( 'give-logout-nonce' ), |
|
46 | - 'give_logout_redirect' => urlencode( $logout_redirect ) |
|
47 | - ), |
|
48 | - home_url('/') |
|
49 | - ); |
|
41 | + // Add user_logout action to logout url. |
|
42 | + $logout_redirect = add_query_arg( |
|
43 | + array( |
|
44 | + 'give_action' => 'user_logout', |
|
45 | + 'give_logout_nonce' => wp_create_nonce( 'give-logout-nonce' ), |
|
46 | + 'give_logout_redirect' => urlencode( $logout_redirect ) |
|
47 | + ), |
|
48 | + home_url('/') |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | $give_login_redirect = $login_redirect; |
52 | 52 | $give_logout_redirect = $logout_redirect; |
@@ -136,23 +136,23 @@ discard block |
||
136 | 136 | * @return void |
137 | 137 | */ |
138 | 138 | function give_process_user_logout( $data ) { |
139 | - if ( wp_verify_nonce( $data['give_logout_nonce'], 'give-logout-nonce' ) && is_user_logged_in() ) { |
|
139 | + if ( wp_verify_nonce( $data['give_logout_nonce'], 'give-logout-nonce' ) && is_user_logged_in() ) { |
|
140 | 140 | |
141 | - // Prevent occurring of any custom action on wp_logout. |
|
142 | - remove_all_actions( 'wp_logout' ); |
|
141 | + // Prevent occurring of any custom action on wp_logout. |
|
142 | + remove_all_actions( 'wp_logout' ); |
|
143 | 143 | |
144 | - // Before logout give action. |
|
145 | - do_action( 'give_before_user_logout' ); |
|
144 | + // Before logout give action. |
|
145 | + do_action( 'give_before_user_logout' ); |
|
146 | 146 | |
147 | - // Logout user. |
|
148 | - wp_logout(); |
|
147 | + // Logout user. |
|
148 | + wp_logout(); |
|
149 | 149 | |
150 | - // After logout give action. |
|
151 | - do_action( 'give_after_user_logout' ); |
|
150 | + // After logout give action. |
|
151 | + do_action( 'give_after_user_logout' ); |
|
152 | 152 | |
153 | - wp_redirect( $data['give_logout_redirect'] ); |
|
154 | - give_die(); |
|
155 | - } |
|
153 | + wp_redirect( $data['give_logout_redirect'] ); |
|
154 | + give_die(); |
|
155 | + } |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | add_action( 'give_user_logout', 'give_process_user_logout' ); |