@@ -812,10 +812,10 @@ discard block |
||
812 | 812 | } |
813 | 813 | |
814 | 814 | if ( ! is_int( $params[1] ) |
815 | - && ! is_float( $params[1] ) |
|
816 | - && ! is_string( $params[1] ) |
|
817 | - && $params[1] !== null |
|
818 | - && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) |
|
815 | + && ! is_float( $params[1] ) |
|
816 | + && ! is_string( $params[1] ) |
|
817 | + && $params[1] !== null |
|
818 | + && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) |
|
819 | 819 | ) { |
820 | 820 | trigger_error( esc_html__( 'array_column(): The column key should be either a string or an integer.', 'give' ), E_USER_WARNING ); |
821 | 821 | |
@@ -823,10 +823,10 @@ discard block |
||
823 | 823 | } |
824 | 824 | |
825 | 825 | if ( isset( $params[2] ) |
826 | - && ! is_int( $params[2] ) |
|
827 | - && ! is_float( $params[2] ) |
|
828 | - && ! is_string( $params[2] ) |
|
829 | - && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) |
|
826 | + && ! is_int( $params[2] ) |
|
827 | + && ! is_float( $params[2] ) |
|
828 | + && ! is_string( $params[2] ) |
|
829 | + && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) |
|
830 | 830 | ) { |
831 | 831 | trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING ); |
832 | 832 |
@@ -1050,7 +1050,7 @@ |
||
1050 | 1050 | // Find a match between price_id and level_id. |
1051 | 1051 | // First verify array keys exists THEN make the match. |
1052 | 1052 | if ( ( isset( $args['price_id'] ) && isset( $price['_give_id']['level_id'] ) ) |
1053 | - && $args['price_id'] == $price['_give_id']['level_id'] |
|
1053 | + && $args['price_id'] == $price['_give_id']['level_id'] |
|
1054 | 1054 | ) { |
1055 | 1055 | $item_price = $price['_give_amount']; |
1056 | 1056 | } |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | * @since 1.0 |
112 | 112 | * @access public |
113 | 113 | * |
114 | - * @param int $column Column ID. |
|
115 | - * @param int $row_id Row ID. |
|
116 | - * |
|
117 | - * @return object |
|
114 | + * @param int $column Column ID. |
|
115 | + * @param int $row_id Row ID. |
|
116 | + * |
|
117 | + * @return object |
|
118 | 118 | */ |
119 | 119 | public function get_by( $column, $row_id ) { |
120 | - /* @var WPDB $wpdb */ |
|
121 | - global $wpdb; |
|
120 | + /* @var WPDB $wpdb */ |
|
121 | + global $wpdb; |
|
122 | 122 | |
123 | 123 | $column = esc_sql( $column ); |
124 | 124 | return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $this->table_name WHERE $column = %s LIMIT 1;", $row_id ) ); |
@@ -129,15 +129,15 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @since 1.0 |
131 | 131 | * @access public |
132 | - * |
|
133 | - * @param int $column Column ID. |
|
134 | - * @param int $row_id Row ID. |
|
135 | - * |
|
132 | + * |
|
133 | + * @param int $column Column ID. |
|
134 | + * @param int $row_id Row ID. |
|
135 | + * |
|
136 | 136 | * @return string Column value. |
137 | 137 | */ |
138 | 138 | public function get_column( $column, $row_id ) { |
139 | - /* @var WPDB $wpdb */ |
|
140 | - global $wpdb; |
|
139 | + /* @var WPDB $wpdb */ |
|
140 | + global $wpdb; |
|
141 | 141 | |
142 | 142 | $column = esc_sql( $column ); |
143 | 143 | return $wpdb->get_var( $wpdb->prepare( "SELECT $column FROM $this->table_name WHERE $this->primary_key = %s LIMIT 1;", $row_id ) ); |
@@ -148,16 +148,16 @@ discard block |
||
148 | 148 | * |
149 | 149 | * @since 1.0 |
150 | 150 | * @access public |
151 | - * |
|
152 | - * @param int $column Column ID. |
|
153 | - * @param string $column_where Column name. |
|
154 | - * @param string $column_value Column value. |
|
155 | - * |
|
151 | + * |
|
152 | + * @param int $column Column ID. |
|
153 | + * @param string $column_where Column name. |
|
154 | + * @param string $column_value Column value. |
|
155 | + * |
|
156 | 156 | * @return string |
157 | 157 | */ |
158 | 158 | public function get_column_by( $column, $column_where, $column_value ) { |
159 | - /* @var WPDB $wpdb */ |
|
160 | - global $wpdb; |
|
159 | + /* @var WPDB $wpdb */ |
|
160 | + global $wpdb; |
|
161 | 161 | |
162 | 162 | $column_where = esc_sql( $column_where ); |
163 | 163 | $column = esc_sql( $column ); |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | * |
170 | 170 | * @since 1.0 |
171 | 171 | * @access public |
172 | - * |
|
173 | - * @param array $data |
|
174 | - * @param string $type |
|
175 | - * |
|
172 | + * |
|
173 | + * @param array $data |
|
174 | + * @param string $type |
|
175 | + * |
|
176 | 176 | * @return int |
177 | 177 | */ |
178 | 178 | public function insert( $data, $type = '' ) { |
179 | - /* @var WPDB $wpdb */ |
|
180 | - global $wpdb; |
|
179 | + /* @var WPDB $wpdb */ |
|
180 | + global $wpdb; |
|
181 | 181 | |
182 | 182 | // Set default values. |
183 | 183 | $data = wp_parse_args( $data, $this->get_column_defaults() ); |
@@ -224,16 +224,16 @@ discard block |
||
224 | 224 | * |
225 | 225 | * @since 1.0 |
226 | 226 | * @access public |
227 | - * |
|
228 | - * @param int $row_id Column ID |
|
229 | - * @param array $data |
|
230 | - * @param string $where Column value |
|
231 | - * |
|
227 | + * |
|
228 | + * @param int $row_id Column ID |
|
229 | + * @param array $data |
|
230 | + * @param string $where Column value |
|
231 | + * |
|
232 | 232 | * @return bool |
233 | 233 | */ |
234 | 234 | public function update( $row_id, $data = array(), $where = '' ) { |
235 | - /* @var WPDB $wpdb */ |
|
236 | - global $wpdb; |
|
235 | + /* @var WPDB $wpdb */ |
|
236 | + global $wpdb; |
|
237 | 237 | |
238 | 238 | // Row ID must be positive integer |
239 | 239 | $row_id = absint( $row_id ); |
@@ -271,14 +271,14 @@ discard block |
||
271 | 271 | * |
272 | 272 | * @since 1.0 |
273 | 273 | * @access public |
274 | - * |
|
275 | - * @param int $row_id Column ID. |
|
276 | - * |
|
274 | + * |
|
275 | + * @param int $row_id Column ID. |
|
276 | + * |
|
277 | 277 | * @return bool |
278 | 278 | */ |
279 | 279 | public function delete( $row_id = 0 ) { |
280 | - /* @var WPDB $wpdb */ |
|
281 | - global $wpdb; |
|
280 | + /* @var WPDB $wpdb */ |
|
281 | + global $wpdb; |
|
282 | 282 | |
283 | 283 | // Row ID must be positive integer |
284 | 284 | $row_id = absint( $row_id ); |
@@ -299,13 +299,13 @@ discard block |
||
299 | 299 | * |
300 | 300 | * @since 1.3.2 |
301 | 301 | * @access public |
302 | - * |
|
302 | + * |
|
303 | 303 | * @param string $table The table name. |
304 | - * |
|
304 | + * |
|
305 | 305 | * @return bool If the table name exists. |
306 | 306 | */ |
307 | 307 | public function table_exists( $table ) { |
308 | - /* @var WPDB $wpdb */ |
|
308 | + /* @var WPDB $wpdb */ |
|
309 | 309 | global $wpdb; |
310 | 310 | |
311 | 311 | $table = sanitize_text_field( $table ); |
@@ -185,8 +185,8 @@ |
||
185 | 185 | |
186 | 186 | case 'num_donations' : |
187 | 187 | $value = '<a href="' . |
188 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
189 | - ) . '">' . esc_html( $item['num_donations'] ) . '</a>'; |
|
188 | + admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
189 | + ) . '">' . esc_html( $item['num_donations'] ) . '</a>'; |
|
190 | 190 | break; |
191 | 191 | |
192 | 192 | case 'amount_spent' : |
@@ -87,13 +87,13 @@ |
||
87 | 87 | 'disabled' => __( 'Head', 'give' ), |
88 | 88 | ) |
89 | 89 | ), |
90 | - array( |
|
91 | - 'name' => esc_html__( 'Advanced Settings Docs Link', 'give' ), |
|
92 | - 'id' => 'advanced_settings_docs_link', |
|
93 | - 'url' => esc_url( 'http://docs.givewp.com/settings-advanced' ), |
|
94 | - 'title' => __( 'Advanced Settings', 'give' ), |
|
95 | - 'type' => 'give_docs_link', |
|
96 | - ), |
|
90 | + array( |
|
91 | + 'name' => esc_html__( 'Advanced Settings Docs Link', 'give' ), |
|
92 | + 'id' => 'advanced_settings_docs_link', |
|
93 | + 'url' => esc_url( 'http://docs.givewp.com/settings-advanced' ), |
|
94 | + 'title' => __( 'Advanced Settings', 'give' ), |
|
95 | + 'type' => 'give_docs_link', |
|
96 | + ), |
|
97 | 97 | array( |
98 | 98 | 'id' => 'give_title_data_control_2', |
99 | 99 | 'type' => 'sectionend' |
@@ -137,31 +137,31 @@ |
||
137 | 137 | * @return void |
138 | 138 | */ |
139 | 139 | function give_process_user_logout( $data ) { |
140 | - if ( wp_verify_nonce( $data['give_logout_nonce'], 'give-logout-nonce' ) && is_user_logged_in() ) { |
|
140 | + if ( wp_verify_nonce( $data['give_logout_nonce'], 'give-logout-nonce' ) && is_user_logged_in() ) { |
|
141 | 141 | |
142 | - // Prevent occurring of any custom action on wp_logout. |
|
143 | - remove_all_actions( 'wp_logout' ); |
|
142 | + // Prevent occurring of any custom action on wp_logout. |
|
143 | + remove_all_actions( 'wp_logout' ); |
|
144 | 144 | |
145 | 145 | /** |
146 | 146 | * Fires before processing user logout. |
147 | 147 | * |
148 | 148 | * @since 1.0 |
149 | 149 | */ |
150 | - do_action( 'give_before_user_logout' ); |
|
150 | + do_action( 'give_before_user_logout' ); |
|
151 | 151 | |
152 | - // Logout user. |
|
153 | - wp_logout(); |
|
152 | + // Logout user. |
|
153 | + wp_logout(); |
|
154 | 154 | |
155 | 155 | /** |
156 | 156 | * Fires after processing user logout. |
157 | 157 | * |
158 | 158 | * @since 1.0 |
159 | 159 | */ |
160 | - do_action( 'give_after_user_logout' ); |
|
160 | + do_action( 'give_after_user_logout' ); |
|
161 | 161 | |
162 | - wp_redirect( $data['give_logout_redirect'] ); |
|
163 | - give_die(); |
|
164 | - } |
|
162 | + wp_redirect( $data['give_logout_redirect'] ); |
|
163 | + give_die(); |
|
164 | + } |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | add_action( 'give_user_logout', 'give_process_user_logout' ); |
@@ -185,8 +185,8 @@ |
||
185 | 185 | |
186 | 186 | case 'num_donations' : |
187 | 187 | $value = '<a href="' . |
188 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
189 | - ) . '">' . esc_html( $item['num_donations'] ) . '</a>'; |
|
188 | + admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
189 | + ) . '">' . esc_html( $item['num_donations'] ) . '</a>'; |
|
190 | 190 | break; |
191 | 191 | |
192 | 192 | case 'amount_spent' : |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | 'desc' => __( 'Do you want to display a custom message when the goal is closed?', 'give' ), |
400 | 400 | 'id' => $prefix . 'form_goal_achieved_message', |
401 | 401 | 'type' => 'wysiwyg', |
402 | - 'default' => __( 'Thank you to all our donors, we have met our fundraising goal.', 'give' ), |
|
402 | + 'default' => __( 'Thank you to all our donors, we have met our fundraising goal.', 'give' ), |
|
403 | 403 | ), |
404 | 404 | array( |
405 | 405 | 'name' => 'donation_goal_docs', |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | |
672 | 672 | <div id="<?php echo $setting['id']; ?>" |
673 | 673 | class="panel give_options_panel<?php echo( $show_first_tab_content ? '' : ' give-hidden' ); |
674 | - $show_first_tab_content = false; ?>"> |
|
674 | + $show_first_tab_content = false; ?>"> |
|
675 | 675 | <?php if ( ! empty( $setting['fields'] ) ) : ?> |
676 | 676 | <?php foreach ( $setting['fields'] as $field ) : ?> |
677 | 677 | <?php give_render_field( $field ); ?> |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | 'disabled' => __( 'Disabled', 'give' ), |
87 | 87 | ) |
88 | 88 | ), |
89 | - array( |
|
90 | - 'name' => __( 'PayPal Standard Gateway Settings Docs Link', 'give' ), |
|
91 | - 'id' => 'paypal_standard_gateway_settings_docs_link', |
|
92 | - 'url' => esc_url( 'http://docs.givewp.com/settings-gateway-paypal-standard' ), |
|
93 | - 'title' => __( 'PayPal Standard Gateway Settings', 'give' ), |
|
94 | - 'type' => 'give_docs_link', |
|
95 | - ), |
|
89 | + array( |
|
90 | + 'name' => __( 'PayPal Standard Gateway Settings Docs Link', 'give' ), |
|
91 | + 'id' => 'paypal_standard_gateway_settings_docs_link', |
|
92 | + 'url' => esc_url( 'http://docs.givewp.com/settings-gateway-paypal-standard' ), |
|
93 | + 'title' => __( 'PayPal Standard Gateway Settings', 'give' ), |
|
94 | + 'type' => 'give_docs_link', |
|
95 | + ), |
|
96 | 96 | array( |
97 | 97 | 'type' => 'sectionend', |
98 | 98 | 'id' => 'give_title_gateway_settings_2', |
@@ -145,13 +145,13 @@ discard block |
||
145 | 145 | 'textarea_rows' => 6, |
146 | 146 | ) |
147 | 147 | ), |
148 | - array( |
|
149 | - 'name' => __( 'Offline Donations Settings Docs Link', 'give' ), |
|
150 | - 'id' => 'offline_gateway_settings_docs_link', |
|
151 | - 'url' => esc_url( 'http://docs.givewp.com/settings-gateway-offline-donations' ), |
|
152 | - 'title' => __( 'Offline Gateway Settings', 'give' ), |
|
153 | - 'type' => 'give_docs_link', |
|
154 | - ), |
|
148 | + array( |
|
149 | + 'name' => __( 'Offline Donations Settings Docs Link', 'give' ), |
|
150 | + 'id' => 'offline_gateway_settings_docs_link', |
|
151 | + 'url' => esc_url( 'http://docs.givewp.com/settings-gateway-offline-donations' ), |
|
152 | + 'title' => __( 'Offline Gateway Settings', 'give' ), |
|
153 | + 'type' => 'give_docs_link', |
|
154 | + ), |
|
155 | 155 | array( |
156 | 156 | 'type' => 'sectionend', |
157 | 157 | 'id' => 'give_title_gateway_settings_3', |
@@ -189,13 +189,13 @@ discard block |
||
189 | 189 | 'id' => 'default_gateway', |
190 | 190 | 'type' => 'default_gateway' |
191 | 191 | ), |
192 | - array( |
|
193 | - 'name' => __( 'Gateways Docs Link', 'give' ), |
|
194 | - 'id' => 'gateway_settings_docs_link', |
|
195 | - 'url' => esc_url( 'http://docs.givewp.com/settings-gateways' ), |
|
196 | - 'title' => __( 'Gateway Settings', 'give' ), |
|
197 | - 'type' => 'give_docs_link', |
|
198 | - ), |
|
192 | + array( |
|
193 | + 'name' => __( 'Gateways Docs Link', 'give' ), |
|
194 | + 'id' => 'gateway_settings_docs_link', |
|
195 | + 'url' => esc_url( 'http://docs.givewp.com/settings-gateways' ), |
|
196 | + 'title' => __( 'Gateway Settings', 'give' ), |
|
197 | + 'type' => 'give_docs_link', |
|
198 | + ), |
|
199 | 199 | array( |
200 | 200 | 'id' => 'give_title_gateway_settings_1', |
201 | 201 | 'type' => 'sectionend' |