@@ -235,8 +235,8 @@ discard block |
||
235 | 235 | return $this->get_pagenum(); |
236 | 236 | } |
237 | 237 | |
238 | - if ( isset( $this->_pagination_args[ $key ] ) ) { |
|
239 | - return $this->_pagination_args[ $key ]; |
|
238 | + if ( isset( $this->_pagination_args[$key] ) ) { |
|
239 | + return $this->_pagination_args[$key]; |
|
240 | 240 | } |
241 | 241 | } |
242 | 242 | |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | private function hidden_search_inputs( $param_name ) { |
287 | - if ( ! empty( $_REQUEST[ $param_name ] ) ) { |
|
288 | - $value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) ); |
|
287 | + if ( ! empty( $_REQUEST[$param_name] ) ) { |
|
288 | + $value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) ); |
|
289 | 289 | echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />'; |
290 | 290 | } |
291 | 291 | } |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | echo "<ul class='subsubsub'>\n"; |
331 | 331 | foreach ( $views as $class => $view ) { |
332 | - $views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
332 | + $views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
333 | 333 | } |
334 | 334 | echo implode( " |</li>\n", $views ) . "</li>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
335 | 335 | echo '</ul>'; |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | 'next' => __( 'Next page', 'formidable' ), |
710 | 710 | ); |
711 | 711 | |
712 | - return $labels[ $link ]; |
|
712 | + return $labels[$link]; |
|
713 | 713 | } |
714 | 714 | |
715 | 715 | private function current_url() { |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | |
803 | 803 | // If the primary column doesn't exist fall back to the |
804 | 804 | // first non-checkbox column. |
805 | - if ( ! isset( $columns[ $default ] ) ) { |
|
805 | + if ( ! isset( $columns[$default] ) ) { |
|
806 | 806 | $default = self::get_default_primary_column_name(); |
807 | 807 | } |
808 | 808 | |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | */ |
817 | 817 | $column = apply_filters( 'list_table_primary_column', $default, $this->screen->id ); |
818 | 818 | |
819 | - if ( empty( $column ) || ! isset( $columns[ $column ] ) ) { |
|
819 | + if ( empty( $column ) || ! isset( $columns[$column] ) ) { |
|
820 | 820 | $column = $default; |
821 | 821 | } |
822 | 822 | |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | // In 4.3, we added a fourth argument for primary column. |
839 | 839 | $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); |
840 | 840 | foreach ( $this->_column_headers as $key => $value ) { |
841 | - $column_headers[ $key ] = $value; |
|
841 | + $column_headers[$key] = $value; |
|
842 | 842 | } |
843 | 843 | |
844 | 844 | return $column_headers; |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | $data[1] = false; |
872 | 872 | } |
873 | 873 | |
874 | - $sortable[ $id ] = $data; |
|
874 | + $sortable[$id] = $data; |
|
875 | 875 | } |
876 | 876 | |
877 | 877 | $primary = $this->get_primary_column_name(); |
@@ -948,8 +948,8 @@ discard block |
||
948 | 948 | $class[] = 'column-primary'; |
949 | 949 | } |
950 | 950 | |
951 | - if ( isset( $sortable[ $column_key ] ) ) { |
|
952 | - list( $orderby, $desc_first ) = $sortable[ $column_key ]; |
|
951 | + if ( isset( $sortable[$column_key] ) ) { |
|
952 | + list( $orderby, $desc_first ) = $sortable[$column_key]; |
|
953 | 953 | |
954 | 954 | if ( $current_orderby == $orderby ) { |
955 | 955 | $order = 'asc' == $current_order ? 'desc' : 'asc'; |
@@ -1033,7 +1033,7 @@ discard block |
||
1033 | 1033 | * @return bool Returns true if the setting is not set or if it is not false; otherwise, returns false. |
1034 | 1034 | */ |
1035 | 1035 | protected function should_display( $args, $settings ) { |
1036 | - return ! isset( $args[ $settings ] ) || false !== $args[ $settings ]; |
|
1036 | + return ! isset( $args[$settings] ) || false !== $args[$settings]; |
|
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | /** |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $gateway = $payment_action->post_content['gateway']; |
48 | 48 | $is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) ); |
49 | 49 | if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) { |
50 | - unset( $payment_actions[ $k ] ); |
|
50 | + unset( $payment_actions[$k] ); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | return $payment_actions; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | 'run_triggers' => false, |
85 | 85 | 'show_errors' => true, |
86 | 86 | ); |
87 | - $atts = compact( 'action', 'entry', 'form' ); |
|
87 | + $atts = compact( 'action', 'entry', 'form' ); |
|
88 | 88 | |
89 | 89 | $amount = self::prepare_amount( $action->post_content['amount'], $atts ); |
90 | 90 | if ( empty( $amount ) || $amount == 000 ) { |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $disallowed = array( ';', ':', '!important' ); |
503 | 503 | foreach ( $settings as $k => $s ) { |
504 | 504 | if ( is_string( $s ) ) { |
505 | - $settings[ $k ] = str_replace( $disallowed, '', $s ); |
|
505 | + $settings[$k] = str_replace( $disallowed, '', $s ); |
|
506 | 506 | } |
507 | 507 | } |
508 | 508 | |
@@ -574,18 +574,18 @@ discard block |
||
574 | 574 | * @return array |
575 | 575 | */ |
576 | 576 | public static function remove_cc_validation( $errors, $field, $values ) { |
577 | - $has_processed = isset( $_POST[ 'frmintent' . $field->form_id ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
577 | + $has_processed = isset( $_POST['frmintent' . $field->form_id] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
578 | 578 | if ( ! $has_processed ) { |
579 | 579 | return $errors; |
580 | 580 | } |
581 | 581 | |
582 | 582 | $field_id = isset( $field->temp_id ) ? $field->temp_id : $field->id; |
583 | 583 | |
584 | - if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) { |
|
585 | - unset( $errors[ 'field' . $field_id . '-cc' ] ); |
|
584 | + if ( isset( $errors['field' . $field_id . '-cc'] ) ) { |
|
585 | + unset( $errors['field' . $field_id . '-cc'] ); |
|
586 | 586 | } |
587 | - if ( isset( $errors[ 'field' . $field_id ] ) ) { |
|
588 | - unset( $errors[ 'field' . $field_id ] ); |
|
587 | + if ( isset( $errors['field' . $field_id] ) ) { |
|
588 | + unset( $errors['field' . $field_id] ); |
|
589 | 589 | } |
590 | 590 | |
591 | 591 | return $errors; |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | |
165 | 165 | $conditionally_add = array( 'include_fields', 'fields', 'exclude_fields', 'entry' ); |
166 | 166 | foreach ( $conditionally_add as $index ) { |
167 | - if ( isset( $atts[ $index ] ) ) { |
|
168 | - $entry_atts[ $index ] = $atts[ $index ]; |
|
167 | + if ( isset( $atts[$index] ) ) { |
|
168 | + $entry_atts[$index] = $atts[$index]; |
|
169 | 169 | } |
170 | 170 | } |
171 | 171 | |
@@ -351,8 +351,8 @@ discard block |
||
351 | 351 | |
352 | 352 | $unset = array( 'id', 'form_id', 'format' ); |
353 | 353 | foreach ( $unset as $param ) { |
354 | - if ( isset( $atts[ $param ] ) ) { |
|
355 | - unset( $atts[ $param ] ); |
|
354 | + if ( isset( $atts[$param] ) ) { |
|
355 | + unset( $atts[$param] ); |
|
356 | 356 | } |
357 | 357 | } |
358 | 358 | |
@@ -523,11 +523,11 @@ discard block |
||
523 | 523 | |
524 | 524 | $displayed_value = $this->prepare_display_value_for_array( $field_value->get_displayed_value() ); |
525 | 525 | |
526 | - $output[ $this->get_key_or_id( $field_value ) ] = $displayed_value; |
|
526 | + $output[$this->get_key_or_id( $field_value )] = $displayed_value; |
|
527 | 527 | |
528 | 528 | $has_separate_value = (bool) $field_value->get_field_option( 'separate_value' ); |
529 | 529 | if ( $has_separate_value || $displayed_value !== $field_value->get_saved_value() ) { |
530 | - $output[ $this->get_key_or_id( $field_value ) . '-value' ] = $field_value->get_saved_value(); |
|
530 | + $output[$this->get_key_or_id( $field_value ) . '-value'] = $field_value->get_saved_value(); |
|
531 | 531 | } |
532 | 532 | } |
533 | 533 | } |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | |
918 | 918 | if ( is_array( $value ) ) { |
919 | 919 | foreach ( $value as $key => $single_value ) { |
920 | - $value[ $key ] = $this->strip_html( $single_value ); |
|
920 | + $value[$key] = $this->strip_html( $single_value ); |
|
921 | 921 | } |
922 | 922 | } elseif ( $this->is_plain_text && ! is_array( $value ) ) { |
923 | 923 | if ( strpos( $value, '<img' ) !== false ) { |
@@ -330,11 +330,11 @@ discard block |
||
330 | 330 | |
331 | 331 | // Perform add or remove operation. |
332 | 332 | if ( 'add' === $operation ) { |
333 | - self::$favorite_templates[ $key ][] = $template_id; |
|
333 | + self::$favorite_templates[$key][] = $template_id; |
|
334 | 334 | } elseif ( 'remove' === $operation ) { |
335 | - $position = array_search( $template_id, self::$favorite_templates[ $key ], true ); |
|
335 | + $position = array_search( $template_id, self::$favorite_templates[$key], true ); |
|
336 | 336 | if ( $position !== false ) { |
337 | - unset( self::$favorite_templates[ $key ][ $position ] ); |
|
337 | + unset( self::$favorite_templates[$key][$position] ); |
|
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | foreach ( self::$templates as $key => &$template ) { |
464 | 464 | // Skip the template if the categories are not set. |
465 | 465 | if ( ! isset( $template['categories'] ) ) { |
466 | - unset( self::$templates[ $key ] ); |
|
466 | + unset( self::$templates[$key] ); |
|
467 | 467 | continue; |
468 | 468 | } |
469 | 469 | |
@@ -477,14 +477,14 @@ discard block |
||
477 | 477 | // Add the slug to the new array. |
478 | 478 | $template['category_slugs'][] = $category_slug; |
479 | 479 | |
480 | - if ( ! isset( self::$categories[ $category_slug ] ) ) { |
|
481 | - self::$categories[ $category_slug ] = array( |
|
480 | + if ( ! isset( self::$categories[$category_slug] ) ) { |
|
481 | + self::$categories[$category_slug] = array( |
|
482 | 482 | 'name' => $category, |
483 | 483 | 'count' => 0, |
484 | 484 | ); |
485 | 485 | } |
486 | 486 | |
487 | - self::$categories[ $category_slug ]['count']++; |
|
487 | + self::$categories[$category_slug]['count'] ++; |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | // Mark the template as favorite if it's in the favorite templates list. |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | $redundant_cats = array_merge( array( 'PayPal', 'Stripe', 'Twilio' ), FrmFormsHelper::ignore_template_categories() ); |
500 | 500 | foreach ( $redundant_cats as $redundant_cat ) { |
501 | 501 | $category_slug = sanitize_title( $redundant_cat ); |
502 | - unset( self::$categories[ $category_slug ] ); |
|
502 | + unset( self::$categories[$category_slug] ); |
|
503 | 503 | } |
504 | 504 | |
505 | 505 | // Sort the categories by keys alphabetically. |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | 'count' => 0, |
525 | 525 | ); |
526 | 526 | } |
527 | - $special_categories['all-templates'] = array( |
|
527 | + $special_categories['all-templates'] = array( |
|
528 | 528 | 'name' => __( 'All Templates', 'formidable' ), |
529 | 529 | 'count' => self::get_template_count(), |
530 | 530 | ); |
@@ -552,9 +552,9 @@ discard block |
||
552 | 552 | */ |
553 | 553 | private static function assign_featured_templates() { |
554 | 554 | foreach ( self::FEATURED_TEMPLATES_KEYS as $key ) { |
555 | - if ( isset( self::$templates[ $key ] ) ) { |
|
556 | - self::$templates[ $key ]['is_featured'] = true; |
|
557 | - self::$featured_templates[] = self::$templates[ $key ]; |
|
555 | + if ( isset( self::$templates[$key] ) ) { |
|
556 | + self::$templates[$key]['is_featured'] = true; |
|
557 | + self::$featured_templates[] = self::$templates[$key]; |
|
558 | 558 | } |
559 | 559 | } |
560 | 560 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | <?php esc_html_e( 'Content', 'formidable' ); ?> |
10 | 10 | </label> |
11 | 11 | <?php |
12 | - $e_args = array( |
|
12 | + $e_args = array( |
|
13 | 13 | 'textarea_name' => 'field_options[description_' . absint( $field['id'] ) . ']', |
14 | 14 | 'textarea_rows' => 8, |
15 | 15 | ); |
@@ -89,8 +89,8 @@ |
||
89 | 89 | public function __construct( $data ) { |
90 | 90 | $sections = array( 'counters', 'license', 'payments', 'entries', 'inbox', 'video', 'payments' ); |
91 | 91 | foreach ( $sections as $section ) { |
92 | - if ( isset( $data[ $section ] ) ) { |
|
93 | - $this->view[ $section ] = $data[ $section ]; |
|
92 | + if ( isset( $data[$section] ) ) { |
|
93 | + $this->view[$section] = $data[$section]; |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | } |
@@ -148,13 +148,13 @@ discard block |
||
148 | 148 | |
149 | 149 | $is_setup_intent = 0 === strpos( $intent->id, 'seti_' ); |
150 | 150 | if ( $is_setup_intent ) { |
151 | - $errors[ 'field' . $cc_field_id ] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : ''; |
|
151 | + $errors['field' . $cc_field_id] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : ''; |
|
152 | 152 | } else { |
153 | - $errors[ 'field' . $cc_field_id ] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : ''; |
|
153 | + $errors['field' . $cc_field_id] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : ''; |
|
154 | 154 | } |
155 | 155 | |
156 | - if ( ! $errors[ 'field' . $cc_field_id ] ) { |
|
157 | - $errors[ 'field' . $cc_field_id ] = 'Payment was not successfully processed.'; |
|
156 | + if ( ! $errors['field' . $cc_field_id] ) { |
|
157 | + $errors['field' . $cc_field_id] = 'Payment was not successfully processed.'; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | global $frm_vars; |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | $save_draft = ! empty( $form->options['save_draft'] ); |
183 | 183 | |
184 | 184 | global $frm_vars; |
185 | - $frm_vars['created_entries'][ $form_id ]['errors'] = $errors; |
|
185 | + $frm_vars['created_entries'][$form_id]['errors'] = $errors; |
|
186 | 186 | |
187 | 187 | // Set to true to get FrmProFieldsHelper::get_page_with_error() run. |
188 | - $_POST[ 'frm_page_order_' . $form_id ] = true; |
|
188 | + $_POST['frm_page_order_' . $form_id] = true; |
|
189 | 189 | |
190 | 190 | if ( ! $save_draft ) { |
191 | 191 | // If draft saving is not on, delete the entry. |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | |
196 | 196 | // If draft saving is on, load the draft entry. |
197 | - $frm_vars['created_entries'][ $form_id ]['entry_id'] = $entry_id; |
|
197 | + $frm_vars['created_entries'][$form_id]['entry_id'] = $entry_id; |
|
198 | 198 | add_action( |
199 | 199 | 'frm_filter_final_form', |
200 | 200 | /** |
@@ -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 = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][ get_current_user_id() ] ) && $message['read'][ get_current_user_id() ] < strtotime( '-1 month' ); |
|
161 | - $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][ get_current_user_id() ] ) && $message['dismissed'][ get_current_user_id() ] < strtotime( '-1 week' ); |
|
160 | + $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][get_current_user_id()] ) && $message['read'][get_current_user_id()] < strtotime( '-1 month' ); |
|
161 | + $dismissed = isset( $message['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 | } |
@@ -177,11 +177,11 @@ discard block |
||
177 | 177 | public function filter_messages( &$messages, $type = 'unread' ) { |
178 | 178 | $user_id = get_current_user_id(); |
179 | 179 | foreach ( $messages as $k => $message ) { |
180 | - $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][ $user_id ] ); |
|
180 | + $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][$user_id] ); |
|
181 | 181 | if ( empty( $k ) || $this->is_expired( $message ) || ( $type === 'dismissed' ) !== $dismissed ) { |
182 | - unset( $messages[ $k ] ); |
|
182 | + unset( $messages[$k] ); |
|
183 | 183 | } elseif ( ! $this->is_for_user( $message ) ) { |
184 | - unset( $messages[ $k ] ); |
|
184 | + unset( $messages[$k] ); |
|
185 | 185 | } |
186 | 186 | } |
187 | 187 | $messages = apply_filters( 'frm_filter_inbox', $messages ); |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | * @return void |
228 | 228 | */ |
229 | 229 | public function mark_read( $key ) { |
230 | - if ( ! $key || ! isset( self::$messages[ $key ] ) ) { |
|
230 | + if ( ! $key || ! isset( self::$messages[$key] ) ) { |
|
231 | 231 | return; |
232 | 232 | } |
233 | 233 | |
234 | - if ( ! isset( self::$messages[ $key ]['read'] ) ) { |
|
235 | - self::$messages[ $key ]['read'] = array(); |
|
234 | + if ( ! isset( self::$messages[$key]['read'] ) ) { |
|
235 | + self::$messages[$key]['read'] = array(); |
|
236 | 236 | } |
237 | - self::$messages[ $key ]['read'][ get_current_user_id() ] = time(); |
|
237 | + self::$messages[$key]['read'][get_current_user_id()] = time(); |
|
238 | 238 | |
239 | 239 | $this->update_list(); |
240 | 240 | } |
@@ -247,9 +247,9 @@ discard block |
||
247 | 247 | * @return void |
248 | 248 | */ |
249 | 249 | public function mark_unread( $key ) { |
250 | - $is_read = isset( self::$messages[ $key ] ) && isset( self::$messages[ $key ]['read'] ) && isset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
250 | + $is_read = isset( self::$messages[$key] ) && isset( self::$messages[$key]['read'] ) && isset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
251 | 251 | if ( $is_read ) { |
252 | - unset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
252 | + unset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
253 | 253 | $this->update_list(); |
254 | 254 | } |
255 | 255 | } |
@@ -265,14 +265,14 @@ discard block |
||
265 | 265 | return; |
266 | 266 | } |
267 | 267 | |
268 | - if ( ! isset( self::$messages[ $key ] ) ) { |
|
268 | + if ( ! isset( self::$messages[$key] ) ) { |
|
269 | 269 | return; |
270 | 270 | } |
271 | 271 | |
272 | - if ( ! isset( self::$messages[ $key ]['dismissed'] ) ) { |
|
273 | - self::$messages[ $key ]['dismissed'] = array(); |
|
272 | + if ( ! isset( self::$messages[$key]['dismissed'] ) ) { |
|
273 | + self::$messages[$key]['dismissed'] = array(); |
|
274 | 274 | } |
275 | - self::$messages[ $key ]['dismissed'][ get_current_user_id() ] = time(); |
|
275 | + self::$messages[$key]['dismissed'][get_current_user_id()] = time(); |
|
276 | 276 | |
277 | 277 | $this->update_list(); |
278 | 278 | } |
@@ -286,11 +286,11 @@ discard block |
||
286 | 286 | $user_id = get_current_user_id(); |
287 | 287 | foreach ( self::$messages as $key => $message ) { |
288 | 288 | if ( ! isset( $message['dismissed'] ) ) { |
289 | - self::$messages[ $key ]['dismissed'] = array(); |
|
289 | + self::$messages[$key]['dismissed'] = array(); |
|
290 | 290 | } |
291 | 291 | |
292 | - if ( ! isset( $message['dismissed'][ $user_id ] ) ) { |
|
293 | - self::$messages[ $key ]['dismissed'][ $user_id ] = time(); |
|
292 | + if ( ! isset( $message['dismissed'][$user_id] ) ) { |
|
293 | + self::$messages[$key]['dismissed'][$user_id] = time(); |
|
294 | 294 | } |
295 | 295 | } |
296 | 296 | $this->update_list(); |
@@ -300,8 +300,8 @@ discard block |
||
300 | 300 | $messages = $this->get_messages( 'filter' ); |
301 | 301 | $user_id = get_current_user_id(); |
302 | 302 | foreach ( $messages as $t => $message ) { |
303 | - if ( isset( $message['read'] ) && isset( $message['read'][ $user_id ] ) ) { |
|
304 | - unset( $messages[ $t ] ); |
|
303 | + if ( isset( $message['read'] ) && isset( $message['read'][$user_id] ) ) { |
|
304 | + unset( $messages[$t] ); |
|
305 | 305 | } |
306 | 306 | } |
307 | 307 | return $messages; |
@@ -329,8 +329,8 @@ discard block |
||
329 | 329 | * @return void |
330 | 330 | */ |
331 | 331 | public function remove( $key ) { |
332 | - if ( isset( self::$messages[ $key ] ) ) { |
|
333 | - unset( self::$messages[ $key ] ); |
|
332 | + if ( isset( self::$messages[$key] ) ) { |
|
333 | + unset( self::$messages[$key] ); |
|
334 | 334 | $this->update_list(); |
335 | 335 | } |
336 | 336 | } |
@@ -42,7 +42,8 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | // Only do this for single site installs. |
45 | - if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
45 | + if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { |
|
46 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
46 | 47 | return; |
47 | 48 | } |
48 | 49 |