@@ -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(); |
@@ -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 |
@@ -899,7 +899,7 @@ |
||
899 | 899 | //Find a match between price_id and level_id |
900 | 900 | //First verify array keys exists THEN make the match |
901 | 901 | if ( ( isset( $args['price_id'] ) && isset( $price['_give_id']['level_id'] ) ) |
902 | - && $args['price_id'] == $price['_give_id']['level_id'] |
|
902 | + && $args['price_id'] == $price['_give_id']['level_id'] |
|
903 | 903 | ) { |
904 | 904 | $item_price = $price['_give_amount']; |
905 | 905 | } |
@@ -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; |
@@ -42,16 +42,16 @@ |
||
42 | 42 | 'minWidth' => 320, |
43 | 43 | 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ), |
44 | 44 | ), |
45 | - array( |
|
46 | - 'type' => 'container', |
|
47 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
48 | - ), |
|
49 | - array( |
|
50 | - 'type' => 'textbox', |
|
51 | - 'name' => 'logout-redirect', |
|
52 | - 'minWidth' => 320, |
|
53 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
54 | - ), |
|
45 | + array( |
|
46 | + 'type' => 'container', |
|
47 | + 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
48 | + ), |
|
49 | + array( |
|
50 | + 'type' => 'textbox', |
|
51 | + 'name' => 'logout-redirect', |
|
52 | + 'minWidth' => 320, |
|
53 | + 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
54 | + ), |
|
55 | 55 | ); |
56 | 56 | } |
57 | 57 | } |
@@ -248,8 +248,8 @@ |
||
248 | 248 | |
249 | 249 | // do not reindex array! |
250 | 250 | $field['options'] = array( |
251 | - '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
252 | - ) + $field['options']; |
|
251 | + '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
252 | + ) + $field['options']; |
|
253 | 253 | |
254 | 254 | foreach ( $field['options'] as $value => $text ) { |
255 | 255 | $new_listbox['values'][] = array( |
@@ -427,13 +427,13 @@ discard block |
||
427 | 427 | * |
428 | 428 | * @since 1.0 |
429 | 429 | * @access public |
430 | - * |
|
431 | - * @param array $args |
|
432 | - * |
|
433 | - * @return array|object|null Customers array or object. Null if not found. |
|
430 | + * |
|
431 | + * @param array $args |
|
432 | + * |
|
433 | + * @return array|object|null Customers array or object. Null if not found. |
|
434 | 434 | */ |
435 | 435 | public function get_customers( $args = array() ) { |
436 | - /* @var WPDB $wpdb */ |
|
436 | + /* @var WPDB $wpdb */ |
|
437 | 437 | global $wpdb; |
438 | 438 | |
439 | 439 | $defaults = array( |
@@ -558,13 +558,13 @@ discard block |
||
558 | 558 | * |
559 | 559 | * @since 1.0 |
560 | 560 | * @access public |
561 | - * |
|
562 | - * @param array $args |
|
563 | - * |
|
564 | - * @return int Total number of customers. |
|
561 | + * |
|
562 | + * @param array $args |
|
563 | + * |
|
564 | + * @return int Total number of customers. |
|
565 | 565 | */ |
566 | 566 | public function count( $args = array() ) { |
567 | - /* @var WPDB $wpdb */ |
|
567 | + /* @var WPDB $wpdb */ |
|
568 | 568 | global $wpdb; |
569 | 569 | |
570 | 570 | $where = ' WHERE 1=1 '; |
@@ -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() ); |
@@ -209,16 +209,16 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @since 1.0 |
211 | 211 | * @access public |
212 | - * |
|
213 | - * @param int $row_id Column ID |
|
214 | - * @param array $data |
|
215 | - * @param string $where Column value |
|
216 | - * |
|
212 | + * |
|
213 | + * @param int $row_id Column ID |
|
214 | + * @param array $data |
|
215 | + * @param string $where Column value |
|
216 | + * |
|
217 | 217 | * @return bool |
218 | 218 | */ |
219 | 219 | public function update( $row_id, $data = array(), $where = '' ) { |
220 | - /* @var WPDB $wpdb */ |
|
221 | - global $wpdb; |
|
220 | + /* @var WPDB $wpdb */ |
|
221 | + global $wpdb; |
|
222 | 222 | |
223 | 223 | // Row ID must be positive integer |
224 | 224 | $row_id = absint( $row_id ); |
@@ -256,14 +256,14 @@ discard block |
||
256 | 256 | * |
257 | 257 | * @since 1.0 |
258 | 258 | * @access public |
259 | - * |
|
260 | - * @param int $row_id Column ID. |
|
261 | - * |
|
259 | + * |
|
260 | + * @param int $row_id Column ID. |
|
261 | + * |
|
262 | 262 | * @return bool |
263 | 263 | */ |
264 | 264 | public function delete( $row_id = 0 ) { |
265 | - /* @var WPDB $wpdb */ |
|
266 | - global $wpdb; |
|
265 | + /* @var WPDB $wpdb */ |
|
266 | + global $wpdb; |
|
267 | 267 | |
268 | 268 | // Row ID must be positive integer |
269 | 269 | $row_id = absint( $row_id ); |
@@ -284,13 +284,13 @@ discard block |
||
284 | 284 | * |
285 | 285 | * @since 1.3.2 |
286 | 286 | * @access public |
287 | - * |
|
287 | + * |
|
288 | 288 | * @param string $table The table name. |
289 | - * |
|
289 | + * |
|
290 | 290 | * @return bool If the table name exists. |
291 | 291 | */ |
292 | 292 | public function table_exists( $table ) { |
293 | - /* @var WPDB $wpdb */ |
|
293 | + /* @var WPDB $wpdb */ |
|
294 | 294 | global $wpdb; |
295 | 295 | |
296 | 296 | $table = sanitize_text_field( $table ); |
@@ -358,9 +358,9 @@ |
||
358 | 358 | require_once GIVE_PLUGIN_DIR . 'includes/emails/template.php'; |
359 | 359 | require_once GIVE_PLUGIN_DIR . 'includes/emails/actions.php'; |
360 | 360 | |
361 | - if( defined( 'WP_CLI' ) && WP_CLI ) { |
|
362 | - require_once GIVE_PLUGIN_DIR . 'includes/class-give-cli-commands.php'; |
|
363 | - } |
|
361 | + if( defined( 'WP_CLI' ) && WP_CLI ) { |
|
362 | + require_once GIVE_PLUGIN_DIR . 'includes/class-give-cli-commands.php'; |
|
363 | + } |
|
364 | 364 | |
365 | 365 | if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { |
366 | 366 |