@@ -33,10 +33,10 @@ |
||
33 | 33 | 'turnstile' => 'FrmTurnstileSettings', |
34 | 34 | ); |
35 | 35 | |
36 | - if ( ! isset( $settings_classes[ $active_captcha ] ) ) { |
|
36 | + if ( ! isset( $settings_classes[$active_captcha] ) ) { |
|
37 | 37 | $active_captcha = 'recaptcha'; |
38 | 38 | } |
39 | 39 | |
40 | - return $settings_classes[ $active_captcha ]; |
|
40 | + return $settings_classes[$active_captcha]; |
|
41 | 41 | } |
42 | 42 | } |
@@ -255,8 +255,8 @@ discard block |
||
255 | 255 | |
256 | 256 | if ( is_wp_error( $resp ) ) { |
257 | 257 | $error_string = $resp->get_error_message(); |
258 | - $errors[ 'field' . $args['id'] ] = __( 'There was a problem verifying your captcha', 'formidable' ); |
|
259 | - $errors[ 'field' . $args['id'] ] .= ' ' . $error_string; |
|
258 | + $errors['field' . $args['id']] = __( 'There was a problem verifying your captcha', 'formidable' ); |
|
259 | + $errors['field' . $args['id']] .= ' ' . $error_string; |
|
260 | 260 | return $errors; |
261 | 261 | } |
262 | 262 | |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | if ( $invalid_message === __( 'The reCAPTCHA was not entered correctly', 'formidable' ) ) { |
284 | 284 | $invalid_message = ''; |
285 | 285 | } |
286 | - $errors[ 'field' . $args['id'] ] = ( $invalid_message === '' ? $frm_settings->re_msg : $invalid_message ); |
|
286 | + $errors['field' . $args['id']] = ( $invalid_message === '' ? $frm_settings->re_msg : $invalid_message ); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | return $errors; |
@@ -299,8 +299,8 @@ discard block |
||
299 | 299 | $frm_vars['captcha_scores'] = array(); |
300 | 300 | } |
301 | 301 | $form_id = is_object( $this->field ) ? $this->field->form_id : $this->field['form_id']; |
302 | - if ( ! isset( $frm_vars['captcha_scores'][ $form_id ] ) ) { |
|
303 | - $frm_vars['captcha_scores'][ $form_id ] = $score; |
|
302 | + if ( ! isset( $frm_vars['captcha_scores'][$form_id] ) ) { |
|
303 | + $frm_vars['captcha_scores'][$form_id] = $score; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | protected static function post_data_includes_token() { |
330 | 330 | $settings = FrmCaptchaFactory::get_settings_object(); |
331 | 331 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
332 | - return ! empty( $_POST[ $settings->token_field ] ); |
|
332 | + return ! empty( $_POST[$settings->token_field] ); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /** |
@@ -216,16 +216,16 @@ |
||
216 | 216 | namespace WPMailSMTP { |
217 | 217 | class Options { |
218 | 218 | /** |
219 | - * @return Options |
|
220 | - */ |
|
219 | + * @return Options |
|
220 | + */ |
|
221 | 221 | public static function init() { |
222 | 222 | } |
223 | 223 | /** |
224 | - * @param string $group |
|
225 | - * @param string $key |
|
226 | - * @param bool $strip_slashes |
|
227 | - * @return mixed|null |
|
228 | - */ |
|
224 | + * @param string $group |
|
225 | + * @param string $key |
|
226 | + * @param bool $strip_slashes |
|
227 | + * @return mixed|null |
|
228 | + */ |
|
229 | 229 | public function get( $group, $key, $strip_slashes = true ) { |
230 | 230 | } |
231 | 231 | } |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | foreach ( $data as $key => $messages ) { |
479 | 479 | if ( in_array( $key, array( 'unread', 'dismissed' ), true ) ) { |
480 | 480 | foreach ( $messages as $key_msg => $message ) { |
481 | - $data[ $key ][ $key_msg ]['cta'] = self::inbox_clean_messages_cta( $message['cta'] ); |
|
481 | + $data[$key][$key_msg]['cta'] = self::inbox_clean_messages_cta( $message['cta'] ); |
|
482 | 482 | } |
483 | 483 | } |
484 | 484 | } |
@@ -557,11 +557,11 @@ discard block |
||
557 | 557 | */ |
558 | 558 | private static function get_dashboard_options( $option_name = null ) { |
559 | 559 | $options = get_option( self::OPTION_META_NAME, array() ); |
560 | - if ( null !== $option_name && ! isset( $options[ $option_name ] ) ) { |
|
560 | + if ( null !== $option_name && ! isset( $options[$option_name] ) ) { |
|
561 | 561 | return array(); |
562 | 562 | } |
563 | 563 | if ( null !== $option_name ) { |
564 | - return $options[ $option_name ]; |
|
564 | + return $options[$option_name]; |
|
565 | 565 | } |
566 | 566 | return $options; |
567 | 567 | } |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | */ |
577 | 577 | private static function update_dashboard_options( $data, $option_name ) { |
578 | 578 | $options = self::get_dashboard_options(); |
579 | - $options[ $option_name ] = $data; |
|
579 | + $options[$option_name] = $data; |
|
580 | 580 | update_option( self::OPTION_META_NAME, $options, 'no' ); |
581 | 581 | } |
582 | 582 |
@@ -111,7 +111,7 @@ |
||
111 | 111 | FrmSubmitHelper::FIELD_TYPE => 'FrmFieldSubmit', |
112 | 112 | ); |
113 | 113 | |
114 | - $class = isset( $type_classes[ $field_type ] ) ? $type_classes[ $field_type ] : ''; |
|
114 | + $class = isset( $type_classes[$field_type] ) ? $type_classes[$field_type] : ''; |
|
115 | 115 | |
116 | 116 | return apply_filters( 'frm_get_field_type_class', $class, $field_type ); |
117 | 117 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | return; |
106 | 106 | } |
107 | 107 | |
108 | - if ( isset( self::$messages[ $message['key'] ] ) && ! isset( $message['force'] ) ) { |
|
108 | + if ( isset( self::$messages[$message['key']] ) && ! isset( $message['force'] ) ) { |
|
109 | 109 | // Don't replace messages unless required. |
110 | 110 | return; |
111 | 111 | } |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | return; |
115 | 115 | } |
116 | 116 | |
117 | - if ( isset( self::$messages[ $message['key'] ] ) ) { |
|
117 | + if ( isset( self::$messages[$message['key']] ) ) { |
|
118 | 118 | // Move up and mark as new. |
119 | - unset( self::$messages[ $message['key'] ] ); |
|
119 | + unset( self::$messages[$message['key']] ); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | $this->fill_message( $message ); |
123 | - self::$messages[ $message['key'] ] = $message; |
|
123 | + self::$messages[$message['key']] = $message; |
|
124 | 124 | |
125 | 125 | $this->update_list(); |
126 | 126 | |
@@ -157,11 +157,11 @@ discard block |
||
157 | 157 | private function clean_messages() { |
158 | 158 | $removed = false; |
159 | 159 | foreach ( self::$messages as $t => $message ) { |
160 | - $read = ! empty( $message['read'] ) && isset( $message['read'][ get_current_user_id() ] ) && $message['read'][ get_current_user_id() ] < strtotime( '-1 month' ); |
|
161 | - $dismissed = ! empty( $message['dismissed'] ) && isset( $message['dismissed'][ get_current_user_id() ] ) && $message['dismissed'][ get_current_user_id() ] < strtotime( '-1 week' ); |
|
160 | + $read = ! empty( $message['read'] ) && isset( $message['read'][get_current_user_id()] ) && $message['read'][get_current_user_id()] < strtotime( '-1 month' ); |
|
161 | + $dismissed = ! empty( $message['dismissed'] ) && isset( $message['dismissed'][get_current_user_id()] ) && $message['dismissed'][get_current_user_id()] < strtotime( '-1 week' ); |
|
162 | 162 | $expired = $this->is_expired( $message ); |
163 | 163 | if ( $read || $expired || $dismissed ) { |
164 | - unset( self::$messages[ $t ] ); |
|
164 | + unset( self::$messages[$t] ); |
|
165 | 165 | $removed = true; |
166 | 166 | } |
167 | 167 | } |
@@ -179,11 +179,11 @@ discard block |
||
179 | 179 | public function filter_messages( &$messages, $type = 'unread' ) { |
180 | 180 | $user_id = get_current_user_id(); |
181 | 181 | foreach ( $messages as $k => $message ) { |
182 | - $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][ $user_id ] ); |
|
182 | + $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][$user_id] ); |
|
183 | 183 | if ( empty( $k ) || $this->is_expired( $message ) || ( $type === 'dismissed' ) !== $dismissed ) { |
184 | - unset( $messages[ $k ] ); |
|
184 | + unset( $messages[$k] ); |
|
185 | 185 | } elseif ( ! $this->is_for_user( $message ) ) { |
186 | - unset( $messages[ $k ] ); |
|
186 | + unset( $messages[$k] ); |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | $messages = apply_filters( 'frm_filter_inbox', $messages ); |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | * @return void |
242 | 242 | */ |
243 | 243 | public function mark_read( $key ) { |
244 | - if ( ! $key || ! isset( self::$messages[ $key ] ) ) { |
|
244 | + if ( ! $key || ! isset( self::$messages[$key] ) ) { |
|
245 | 245 | return; |
246 | 246 | } |
247 | 247 | |
248 | - if ( ! isset( self::$messages[ $key ]['read'] ) ) { |
|
249 | - self::$messages[ $key ]['read'] = array(); |
|
248 | + if ( ! isset( self::$messages[$key]['read'] ) ) { |
|
249 | + self::$messages[$key]['read'] = array(); |
|
250 | 250 | } |
251 | - self::$messages[ $key ]['read'][ get_current_user_id() ] = time(); |
|
251 | + self::$messages[$key]['read'][get_current_user_id()] = time(); |
|
252 | 252 | |
253 | 253 | $this->update_list(); |
254 | 254 | } |
@@ -260,9 +260,9 @@ discard block |
||
260 | 260 | * @return void |
261 | 261 | */ |
262 | 262 | public function mark_unread( $key ) { |
263 | - $is_read = isset( self::$messages[ $key ] ) && isset( self::$messages[ $key ]['read'] ) && isset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
263 | + $is_read = isset( self::$messages[$key] ) && isset( self::$messages[$key]['read'] ) && isset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
264 | 264 | if ( $is_read ) { |
265 | - unset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
265 | + unset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
266 | 266 | $this->update_list(); |
267 | 267 | } |
268 | 268 | } |
@@ -278,14 +278,14 @@ discard block |
||
278 | 278 | return; |
279 | 279 | } |
280 | 280 | |
281 | - if ( ! isset( self::$messages[ $key ] ) ) { |
|
281 | + if ( ! isset( self::$messages[$key] ) ) { |
|
282 | 282 | return; |
283 | 283 | } |
284 | 284 | |
285 | - if ( ! isset( self::$messages[ $key ]['dismissed'] ) ) { |
|
286 | - self::$messages[ $key ]['dismissed'] = array(); |
|
285 | + if ( ! isset( self::$messages[$key]['dismissed'] ) ) { |
|
286 | + self::$messages[$key]['dismissed'] = array(); |
|
287 | 287 | } |
288 | - self::$messages[ $key ]['dismissed'][ get_current_user_id() ] = time(); |
|
288 | + self::$messages[$key]['dismissed'][get_current_user_id()] = time(); |
|
289 | 289 | |
290 | 290 | $this->update_list(); |
291 | 291 | } |
@@ -299,11 +299,11 @@ discard block |
||
299 | 299 | $user_id = get_current_user_id(); |
300 | 300 | foreach ( self::$messages as $key => $message ) { |
301 | 301 | if ( ! isset( $message['dismissed'] ) ) { |
302 | - self::$messages[ $key ]['dismissed'] = array(); |
|
302 | + self::$messages[$key]['dismissed'] = array(); |
|
303 | 303 | } |
304 | 304 | |
305 | - if ( ! isset( $message['dismissed'][ $user_id ] ) ) { |
|
306 | - self::$messages[ $key ]['dismissed'][ $user_id ] = time(); |
|
305 | + if ( ! isset( $message['dismissed'][$user_id] ) ) { |
|
306 | + self::$messages[$key]['dismissed'][$user_id] = time(); |
|
307 | 307 | } |
308 | 308 | } |
309 | 309 | $this->update_list(); |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | $messages = $this->get_messages( 'filter' ); |
314 | 314 | $user_id = get_current_user_id(); |
315 | 315 | foreach ( $messages as $t => $message ) { |
316 | - if ( isset( $message['read'] ) && isset( $message['read'][ $user_id ] ) ) { |
|
317 | - unset( $messages[ $t ] ); |
|
316 | + if ( isset( $message['read'] ) && isset( $message['read'][$user_id] ) ) { |
|
317 | + unset( $messages[$t] ); |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | return $messages; |
@@ -341,8 +341,8 @@ discard block |
||
341 | 341 | * @return void |
342 | 342 | */ |
343 | 343 | public function remove( $key ) { |
344 | - if ( isset( self::$messages[ $key ] ) ) { |
|
345 | - unset( self::$messages[ $key ] ); |
|
344 | + if ( isset( self::$messages[$key] ) ) { |
|
345 | + unset( self::$messages[$key] ); |
|
346 | 346 | $this->update_list(); |
347 | 347 | } |
348 | 348 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | * @param array $matches The regex results for a single match. |
389 | 389 | * @return string |
390 | 390 | */ |
391 | - function ( $matches ) { |
|
391 | + function( $matches ) { |
|
392 | 392 | $url = $matches[2]; |
393 | 393 | $parts = parse_url( $url ); |
394 | 394 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | return array_filter( |
453 | 453 | $inbox->get_messages( 'filter' ), |
454 | 454 | function( $message ) use ( $key ) { |
455 | - return ! empty( $message[ $key ] ); |
|
455 | + return ! empty( $message[$key] ); |
|
456 | 456 | } |
457 | 457 | ); |
458 | 458 | } |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | return array_reduce( |
500 | 500 | $keys_to_return, |
501 | 501 | function( $total, $key ) use ( $message ) { |
502 | - $total[ $key ] = $message[ $key ]; |
|
502 | + $total[$key] = $message[$key]; |
|
503 | 503 | return $total; |
504 | 504 | }, |
505 | 505 | array() |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | public static function get_current_action_from_global_var( $form_id ) { |
72 | 72 | global $frm_vars; |
73 | 73 | |
74 | - if ( isset( $frm_vars['form_params'][ $form_id ]['action'] ) ) { |
|
75 | - return $frm_vars['form_params'][ $form_id ]['action']; |
|
74 | + if ( isset( $frm_vars['form_params'][$form_id]['action'] ) ) { |
|
75 | + return $frm_vars['form_params'][$form_id]['action']; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return 'create'; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | public static function remove_submit_field_from_list( &$fields ) { |
168 | 168 | foreach ( $fields as $key => $field ) { |
169 | 169 | if ( self::FIELD_TYPE === FrmField::get_field_type( $field ) ) { |
170 | - unset( $fields[ $key ] ); |
|
170 | + unset( $fields[$key] ); |
|
171 | 171 | return; |
172 | 172 | } |
173 | 173 | } |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | return $this->get_pagenum(); |
226 | 226 | } |
227 | 227 | |
228 | - if ( isset( $this->_pagination_args[ $key ] ) ) { |
|
229 | - return $this->_pagination_args[ $key ]; |
|
228 | + if ( isset( $this->_pagination_args[$key] ) ) { |
|
229 | + return $this->_pagination_args[$key]; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 | |
@@ -271,8 +271,8 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | private function hidden_search_inputs( $param_name ) { |
274 | - if ( ! empty( $_REQUEST[ $param_name ] ) ) { |
|
275 | - $value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) ); |
|
274 | + if ( ! empty( $_REQUEST[$param_name] ) ) { |
|
275 | + $value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) ); |
|
276 | 276 | echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />'; |
277 | 277 | } |
278 | 278 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | echo "<ul class='subsubsub'>\n"; |
316 | 316 | foreach ( $views as $class => $view ) { |
317 | - $views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
317 | + $views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
318 | 318 | } |
319 | 319 | echo implode( " |</li>\n", $views ) . "</li>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
320 | 320 | echo '</ul>'; |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | 'next' => __( 'Next page', 'formidable' ), |
687 | 687 | ); |
688 | 688 | |
689 | - return $labels[ $link ]; |
|
689 | + return $labels[$link]; |
|
690 | 690 | } |
691 | 691 | |
692 | 692 | private function current_url() { |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | |
777 | 777 | // If the primary column doesn't exist fall back to the |
778 | 778 | // first non-checkbox column. |
779 | - if ( ! isset( $columns[ $default ] ) ) { |
|
779 | + if ( ! isset( $columns[$default] ) ) { |
|
780 | 780 | $default = self::get_default_primary_column_name(); |
781 | 781 | } |
782 | 782 | |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | */ |
791 | 791 | $column = apply_filters( 'list_table_primary_column', $default, $this->screen->id ); |
792 | 792 | |
793 | - if ( empty( $column ) || ! isset( $columns[ $column ] ) ) { |
|
793 | + if ( empty( $column ) || ! isset( $columns[$column] ) ) { |
|
794 | 794 | $column = $default; |
795 | 795 | } |
796 | 796 | |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | // In 4.3, we added a fourth argument for primary column. |
812 | 812 | $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); |
813 | 813 | foreach ( $this->_column_headers as $key => $value ) { |
814 | - $column_headers[ $key ] = $value; |
|
814 | + $column_headers[$key] = $value; |
|
815 | 815 | } |
816 | 816 | |
817 | 817 | return $column_headers; |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | $data[1] = false; |
845 | 845 | } |
846 | 846 | |
847 | - $sortable[ $id ] = $data; |
|
847 | + $sortable[$id] = $data; |
|
848 | 848 | } |
849 | 849 | |
850 | 850 | $primary = $this->get_primary_column_name(); |
@@ -922,8 +922,8 @@ discard block |
||
922 | 922 | $class[] = 'column-primary'; |
923 | 923 | } |
924 | 924 | |
925 | - if ( isset( $sortable[ $column_key ] ) ) { |
|
926 | - list( $orderby, $desc_first ) = $sortable[ $column_key ]; |
|
925 | + if ( isset( $sortable[$column_key] ) ) { |
|
926 | + list( $orderby, $desc_first ) = $sortable[$column_key]; |
|
927 | 927 | |
928 | 928 | if ( $current_orderby == $orderby ) { |
929 | 929 | // The sorted column. The `aria-sort` attribute must be set only on the sorted column. |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | * @return bool Returns true if the setting is not set or if it is not false; otherwise, returns false. |
1037 | 1037 | */ |
1038 | 1038 | protected function should_display( $args, $settings ) { |
1039 | - return ! isset( $args[ $settings ] ) || false !== $args[ $settings ]; |
|
1039 | + return ! isset( $args[$settings] ) || false !== $args[$settings]; |
|
1040 | 1040 | } |
1041 | 1041 | |
1042 | 1042 | /** |