@@ -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 | |
@@ -156,11 +156,11 @@ discard block |
||
| 156 | 156 | private function clean_messages() { |
| 157 | 157 | $removed = false; |
| 158 | 158 | foreach ( self::$messages as $t => $message ) { |
| 159 | - $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][ get_current_user_id() ] ) && $message['read'][ get_current_user_id() ] < strtotime( '-1 month' ); |
|
| 160 | - $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][ get_current_user_id() ] ) && $message['dismissed'][ get_current_user_id() ] < strtotime( '-1 week' ); |
|
| 159 | + $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][get_current_user_id()] ) && $message['read'][get_current_user_id()] < strtotime( '-1 month' ); |
|
| 160 | + $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][get_current_user_id()] ) && $message['dismissed'][get_current_user_id()] < strtotime( '-1 week' ); |
|
| 161 | 161 | $expired = $this->is_expired( $message ); |
| 162 | 162 | if ( $read || $expired || $dismissed ) { |
| 163 | - unset( self::$messages[ $t ] ); |
|
| 163 | + unset( self::$messages[$t] ); |
|
| 164 | 164 | $removed = true; |
| 165 | 165 | } |
| 166 | 166 | } |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | public function filter_messages( &$messages, $type = 'unread' ) { |
| 177 | 177 | $user_id = get_current_user_id(); |
| 178 | 178 | foreach ( $messages as $k => $message ) { |
| 179 | - $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][ $user_id ] ); |
|
| 179 | + $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][$user_id] ); |
|
| 180 | 180 | if ( empty( $k ) || $this->is_expired( $message ) || ( $dismissed && 'dismissed' !== $type ) || ( 'dismissed' === $type && ! $dismissed ) ) { |
| 181 | - unset( $messages[ $k ] ); |
|
| 181 | + unset( $messages[$k] ); |
|
| 182 | 182 | } elseif ( ! $this->is_for_user( $message ) ) { |
| 183 | - unset( $messages[ $k ] ); |
|
| 183 | + unset( $messages[$k] ); |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | $messages = apply_filters( 'frm_filter_inbox', $messages ); |
@@ -226,14 +226,14 @@ discard block |
||
| 226 | 226 | * @return void |
| 227 | 227 | */ |
| 228 | 228 | public function mark_read( $key ) { |
| 229 | - if ( ! $key || ! isset( self::$messages[ $key ] ) ) { |
|
| 229 | + if ( ! $key || ! isset( self::$messages[$key] ) ) { |
|
| 230 | 230 | return; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - if ( ! isset( self::$messages[ $key ]['read'] ) ) { |
|
| 234 | - self::$messages[ $key ]['read'] = array(); |
|
| 233 | + if ( ! isset( self::$messages[$key]['read'] ) ) { |
|
| 234 | + self::$messages[$key]['read'] = array(); |
|
| 235 | 235 | } |
| 236 | - self::$messages[ $key ]['read'][ get_current_user_id() ] = time(); |
|
| 236 | + self::$messages[$key]['read'][get_current_user_id()] = time(); |
|
| 237 | 237 | |
| 238 | 238 | $this->update_list(); |
| 239 | 239 | } |
@@ -246,9 +246,9 @@ discard block |
||
| 246 | 246 | * @return void |
| 247 | 247 | */ |
| 248 | 248 | public function mark_unread( $key ) { |
| 249 | - $is_read = isset( self::$messages[ $key ] ) && isset( self::$messages[ $key ]['read'] ) && isset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
| 249 | + $is_read = isset( self::$messages[$key] ) && isset( self::$messages[$key]['read'] ) && isset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
| 250 | 250 | if ( $is_read ) { |
| 251 | - unset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
| 251 | + unset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
| 252 | 252 | $this->update_list(); |
| 253 | 253 | } |
| 254 | 254 | } |
@@ -264,14 +264,14 @@ discard block |
||
| 264 | 264 | return; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | - if ( ! isset( self::$messages[ $key ] ) ) { |
|
| 267 | + if ( ! isset( self::$messages[$key] ) ) { |
|
| 268 | 268 | return; |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - if ( ! isset( self::$messages[ $key ]['dismissed'] ) ) { |
|
| 272 | - self::$messages[ $key ]['dismissed'] = array(); |
|
| 271 | + if ( ! isset( self::$messages[$key]['dismissed'] ) ) { |
|
| 272 | + self::$messages[$key]['dismissed'] = array(); |
|
| 273 | 273 | } |
| 274 | - self::$messages[ $key ]['dismissed'][ get_current_user_id() ] = time(); |
|
| 274 | + self::$messages[$key]['dismissed'][get_current_user_id()] = time(); |
|
| 275 | 275 | |
| 276 | 276 | $this->update_list(); |
| 277 | 277 | } |
@@ -285,11 +285,11 @@ discard block |
||
| 285 | 285 | $user_id = get_current_user_id(); |
| 286 | 286 | foreach ( self::$messages as $key => $message ) { |
| 287 | 287 | if ( ! isset( $message['dismissed'] ) ) { |
| 288 | - self::$messages[ $key ]['dismissed'] = array(); |
|
| 288 | + self::$messages[$key]['dismissed'] = array(); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - if ( ! isset( $message['dismissed'][ $user_id ] ) ) { |
|
| 292 | - self::$messages[ $key ]['dismissed'][ $user_id ] = time(); |
|
| 291 | + if ( ! isset( $message['dismissed'][$user_id] ) ) { |
|
| 292 | + self::$messages[$key]['dismissed'][$user_id] = time(); |
|
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | $this->update_list(); |
@@ -299,8 +299,8 @@ discard block |
||
| 299 | 299 | $messages = $this->get_messages( 'filter' ); |
| 300 | 300 | $user_id = get_current_user_id(); |
| 301 | 301 | foreach ( $messages as $t => $message ) { |
| 302 | - if ( isset( $message['read'] ) && isset( $message['read'][ $user_id ] ) ) { |
|
| 303 | - unset( $messages[ $t ] ); |
|
| 302 | + if ( isset( $message['read'] ) && isset( $message['read'][$user_id] ) ) { |
|
| 303 | + unset( $messages[$t] ); |
|
| 304 | 304 | } |
| 305 | 305 | } |
| 306 | 306 | return $messages; |
@@ -328,8 +328,8 @@ discard block |
||
| 328 | 328 | * @return void |
| 329 | 329 | */ |
| 330 | 330 | public function remove( $key ) { |
| 331 | - if ( isset( self::$messages[ $key ] ) ) { |
|
| 332 | - unset( self::$messages[ $key ] ); |
|
| 331 | + if ( isset( self::$messages[$key] ) ) { |
|
| 332 | + unset( self::$messages[$key] ); |
|
| 333 | 333 | $this->update_list(); |
| 334 | 334 | } |
| 335 | 335 | } |
@@ -15,20 +15,26 @@ |
||
| 15 | 15 | <h4><?php echo esc_html( $counter['heading'] ); ?></h4> |
| 16 | 16 | <?php if ( isset( $counter['cta'] ) && isset( $counter['cta']['display'] ) && true === $counter['cta']['display'] ) : ?> |
| 17 | 17 | <a href="<?php echo esc_url( $counter['cta']['link'] ); ?>"><?php echo esc_attr( $counter['cta']['title'] ); ?></a> |
| 18 | - <?php else : ?> |
|
| 18 | + <?php else { |
|
| 19 | + : ?> |
|
| 19 | 20 | <?php if ( 'currency' === $counter['type'] ) : ?> |
| 20 | 21 | <div class="frm-flex-box frm-gap-md"> |
| 21 | 22 | <?php foreach ( $counter['items'] as $item ) : ?> |
| 22 | 23 | <b> |
| 23 | - <?php echo esc_attr( $item['counter_label']['symbol_left'] ); ?> |
|
| 24 | + <?php echo esc_attr( $item['counter_label']['symbol_left'] ); |
|
| 25 | +} |
|
| 26 | +?> |
|
| 24 | 27 | <span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); ?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $item['counter']; ?>"><?php echo (int) $item['counter']; ?></span> |
| 25 | 28 | <?php echo esc_attr( $item['counter_label']['symbol_right'] ); ?> |
| 26 | 29 | </b> |
| 27 | 30 | <?php endforeach; ?> |
| 28 | 31 | </div> |
| 29 | - <?php else : ?> |
|
| 32 | + <?php else { |
|
| 33 | + : ?> |
|
| 30 | 34 | <b> |
| 31 | - <span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); ?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $counter['counter']; ?>"><?php echo (int) $counter['counter']; ?></span> |
|
| 35 | + <span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); |
|
| 36 | +} |
|
| 37 | +?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $counter['counter']; ?>"><?php echo (int) $counter['counter']; ?></span> |
|
| 32 | 38 | </b> |
| 33 | 39 | <?php endif; ?> |
| 34 | 40 | <?php endif; ?> |
@@ -377,12 +377,12 @@ discard block |
||
| 377 | 377 | if ( $form_id ) { |
| 378 | 378 | self::get_columns_for_form( $form_id, $columns ); |
| 379 | 379 | } else { |
| 380 | - $columns[ $form_id . '_form_id' ] = __( 'Form', 'formidable' ); |
|
| 381 | - $columns[ $form_id . '_name' ] = __( 'Name', 'formidable' ); |
|
| 382 | - $columns[ $form_id . '_user_id' ] = __( 'Author', 'formidable' ); |
|
| 380 | + $columns[$form_id . '_form_id'] = __( 'Form', 'formidable' ); |
|
| 381 | + $columns[$form_id . '_name'] = __( 'Name', 'formidable' ); |
|
| 382 | + $columns[$form_id . '_user_id'] = __( 'Author', 'formidable' ); |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | - $columns[ $form_id . '_created_at' ] = __( 'Created on', 'formidable' ); |
|
| 385 | + $columns[$form_id . '_created_at'] = __( 'Created on', 'formidable' ); |
|
| 386 | 386 | |
| 387 | 387 | return $columns; |
| 388 | 388 | } |
@@ -545,11 +545,11 @@ discard block |
||
| 545 | 545 | */ |
| 546 | 546 | private static function get_dashboard_options( $option_name = null ) { |
| 547 | 547 | $options = get_option( self::$option_meta_name, array() ); |
| 548 | - if ( null !== $option_name && ! isset( $options[ $option_name ] ) ) { |
|
| 548 | + if ( null !== $option_name && ! isset( $options[$option_name] ) ) { |
|
| 549 | 549 | return array(); |
| 550 | 550 | } |
| 551 | 551 | if ( null !== $option_name ) { |
| 552 | - return $options[ $option_name ]; |
|
| 552 | + return $options[$option_name]; |
|
| 553 | 553 | } |
| 554 | 554 | return $options; |
| 555 | 555 | } |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | */ |
| 565 | 565 | private static function update_dashboard_options( $data, $option_name ) { |
| 566 | 566 | $options = self::get_dashboard_options(); |
| 567 | - $options[ $option_name ] = $data; |
|
| 567 | + $options[$option_name] = $data; |
|
| 568 | 568 | update_option( self::$option_meta_name, $options, 'no' ); |
| 569 | 569 | } |
| 570 | 570 | |
@@ -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 | /** |
@@ -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 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | 'fill' => '#4d4d4d', |
| 199 | 199 | 'orange' => '#f05a24', |
| 200 | 200 | ); |
| 201 | - $atts = array_merge( $defaults, $atts ); |
|
| 201 | + $atts = array_merge( $defaults, $atts ); |
|
| 202 | 202 | |
| 203 | 203 | return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 599.68 601.37" width="' . esc_attr( $atts['width'] ) . '" height="' . esc_attr( $atts['height'] ) . '"> |
| 204 | 204 | <path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/> |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | * @return string |
| 406 | 406 | */ |
| 407 | 407 | public static function get_server_value( $value ) { |
| 408 | - return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : ''; |
|
| 408 | + return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : ''; |
|
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | /** |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $ip = ''; |
| 440 | 440 | |
| 441 | 441 | foreach ( $ip_options as $key ) { |
| 442 | - if ( ! isset( $_SERVER[ $key ] ) ) { |
|
| 442 | + if ( ! isset( $_SERVER[$key] ) ) { |
|
| 443 | 443 | continue; |
| 444 | 444 | } |
| 445 | 445 | |
@@ -508,10 +508,10 @@ discard block |
||
| 508 | 508 | } |
| 509 | 509 | |
| 510 | 510 | if ( $src === 'get' ) { |
| 511 | - $value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
|
| 512 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 511 | + $value = isset( $_POST[$param] ) ? wp_unslash( $_POST[$param] ) : ( isset( $_GET[$param] ) ? wp_unslash( $_GET[$param] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
|
| 512 | + if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 513 | 513 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 514 | - $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
|
| 514 | + $value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) ); |
|
| 515 | 515 | } |
| 516 | 516 | self::sanitize_value( $sanitize, $value ); |
| 517 | 517 | } else { |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | $p = trim( $p, ']' ); |
| 535 | - $value = isset( $value[ $p ] ) ? $value[ $p ] : $default; |
|
| 535 | + $value = isset( $value[$p] ) ? $value[$p] : $default; |
|
| 536 | 536 | } |
| 537 | 537 | } |
| 538 | 538 | |
@@ -588,26 +588,26 @@ discard block |
||
| 588 | 588 | 'sanitize' => 'sanitize_text_field', |
| 589 | 589 | 'serialized' => false, |
| 590 | 590 | ); |
| 591 | - $args = wp_parse_args( $args, $defaults ); |
|
| 591 | + $args = wp_parse_args( $args, $defaults ); |
|
| 592 | 592 | |
| 593 | 593 | $value = $args['default']; |
| 594 | 594 | if ( $args['type'] === 'get' ) { |
| 595 | - if ( $_GET && isset( $_GET[ $args['param'] ] ) ) { |
|
| 595 | + if ( $_GET && isset( $_GET[$args['param']] ) ) { |
|
| 596 | 596 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
| 597 | - $value = wp_unslash( $_GET[ $args['param'] ] ); |
|
| 597 | + $value = wp_unslash( $_GET[$args['param']] ); |
|
| 598 | 598 | } |
| 599 | 599 | } elseif ( $args['type'] === 'post' ) { |
| 600 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 600 | + if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 601 | 601 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
| 602 | - $value = wp_unslash( $_POST[ $args['param'] ] ); |
|
| 602 | + $value = wp_unslash( $_POST[$args['param']] ); |
|
| 603 | 603 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
| 604 | 604 | self::unserialize_or_decode( $value ); |
| 605 | 605 | } |
| 606 | 606 | } |
| 607 | 607 | } else { |
| 608 | - if ( isset( $_REQUEST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 608 | + if ( isset( $_REQUEST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 609 | 609 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 610 | - $value = wp_unslash( $_REQUEST[ $args['param'] ] ); |
|
| 610 | + $value = wp_unslash( $_REQUEST[$args['param']] ); |
|
| 611 | 611 | } |
| 612 | 612 | } |
| 613 | 613 | |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | if ( is_array( $value ) ) { |
| 640 | 640 | $temp_values = $value; |
| 641 | 641 | foreach ( $temp_values as $k => $v ) { |
| 642 | - self::sanitize_value( $sanitize, $value[ $k ] ); |
|
| 642 | + self::sanitize_value( $sanitize, $value[$k] ); |
|
| 643 | 643 | } |
| 644 | 644 | } else { |
| 645 | 645 | $value = call_user_func( $sanitize, $value ); |
@@ -650,8 +650,8 @@ discard block |
||
| 650 | 650 | public static function sanitize_request( $sanitize_method, &$values ) { |
| 651 | 651 | $temp_values = $values; |
| 652 | 652 | foreach ( $temp_values as $k => $val ) { |
| 653 | - if ( isset( $sanitize_method[ $k ] ) ) { |
|
| 654 | - $values[ $k ] = call_user_func( $sanitize_method[ $k ], $val ); |
|
| 653 | + if ( isset( $sanitize_method[$k] ) ) { |
|
| 654 | + $values[$k] = call_user_func( $sanitize_method[$k], $val ); |
|
| 655 | 655 | } |
| 656 | 656 | } |
| 657 | 657 | } |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | if ( is_array( $value ) ) { |
| 709 | 709 | $temp_values = $value; |
| 710 | 710 | foreach ( $temp_values as $k => $v ) { |
| 711 | - self::decode_specialchars( $value[ $k ] ); |
|
| 711 | + self::decode_specialchars( $value[$k] ); |
|
| 712 | 712 | } |
| 713 | 713 | } else { |
| 714 | 714 | self::decode_amp( $value ); |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | * @return array |
| 831 | 831 | */ |
| 832 | 832 | public static function add_allowed_submit_button_tags( $allowed_html ) { |
| 833 | - $allowed_html['input'] = array( |
|
| 833 | + $allowed_html['input'] = array( |
|
| 834 | 834 | 'type' => true, |
| 835 | 835 | 'value' => true, |
| 836 | 836 | 'formnovalidate' => true, |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | $allowed_html = $html; |
| 854 | 854 | } elseif ( ! empty( $allowed ) ) { |
| 855 | 855 | foreach ( (array) $allowed as $a ) { |
| 856 | - $allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array(); |
|
| 856 | + $allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array(); |
|
| 857 | 857 | } |
| 858 | 858 | } |
| 859 | 859 | |
@@ -1032,8 +1032,8 @@ discard block |
||
| 1032 | 1032 | } |
| 1033 | 1033 | |
| 1034 | 1034 | global $wp_query; |
| 1035 | - if ( isset( $wp_query->query_vars[ $param ] ) ) { |
|
| 1036 | - $value = $wp_query->query_vars[ $param ]; |
|
| 1035 | + if ( isset( $wp_query->query_vars[$param] ) ) { |
|
| 1036 | + $value = $wp_query->query_vars[$param]; |
|
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | return $value; |
@@ -1062,9 +1062,9 @@ discard block |
||
| 1062 | 1062 | 'frm_keyalt_icon' => 'frm_key_icon', |
| 1063 | 1063 | 'frm_keyalt_solid_icon' => 'frm_key_solid_icon', |
| 1064 | 1064 | ); |
| 1065 | - if ( isset( $deprecated[ $icon ] ) ) { |
|
| 1066 | - $icon = $deprecated[ $icon ]; |
|
| 1067 | - $class = str_replace( $icon, $deprecated[ $icon ], $class ); |
|
| 1065 | + if ( isset( $deprecated[$icon] ) ) { |
|
| 1066 | + $icon = $deprecated[$icon]; |
|
| 1067 | + $class = str_replace( $icon, $deprecated[$icon], $class ); |
|
| 1068 | 1068 | } |
| 1069 | 1069 | |
| 1070 | 1070 | if ( $icon === $class ) { |
@@ -1397,7 +1397,7 @@ discard block |
||
| 1397 | 1397 | 'new_file_path' => self::plugin_path() . '/js', |
| 1398 | 1398 | ) |
| 1399 | 1399 | ); |
| 1400 | - $new_file = new FrmCreateFile( $file_atts ); |
|
| 1400 | + $new_file = new FrmCreateFile( $file_atts ); |
|
| 1401 | 1401 | |
| 1402 | 1402 | $files = array( |
| 1403 | 1403 | self::plugin_path() . '/js/formidable.min.js', |
@@ -1416,7 +1416,7 @@ discard block |
||
| 1416 | 1416 | 'new_file_path' => self::plugin_path() . '/js', |
| 1417 | 1417 | ) |
| 1418 | 1418 | ); |
| 1419 | - $new_file = new FrmCreateFile( $file_atts ); |
|
| 1419 | + $new_file = new FrmCreateFile( $file_atts ); |
|
| 1420 | 1420 | $files = array( |
| 1421 | 1421 | FrmStrpLiteAppHelper::plugin_path() . 'js/frmstrp.min.js', |
| 1422 | 1422 | ); |
@@ -1907,8 +1907,8 @@ discard block |
||
| 1907 | 1907 | return $error; |
| 1908 | 1908 | } |
| 1909 | 1909 | |
| 1910 | - $nonce_value = ( $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : ''; |
|
| 1911 | - if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
| 1910 | + $nonce_value = ( $_REQUEST && isset( $_REQUEST[$nonce_name] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : ''; |
|
| 1911 | + if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
| 1912 | 1912 | $frm_settings = self::get_settings(); |
| 1913 | 1913 | $error = $frm_settings->admin_permission; |
| 1914 | 1914 | } |
@@ -1943,7 +1943,7 @@ discard block |
||
| 1943 | 1943 | } else { |
| 1944 | 1944 | foreach ( $value as $k => $v ) { |
| 1945 | 1945 | if ( ! is_array( $v ) ) { |
| 1946 | - $value[ $k ] = call_user_func( $original_function, $v ); |
|
| 1946 | + $value[$k] = call_user_func( $original_function, $v ); |
|
| 1947 | 1947 | } |
| 1948 | 1948 | } |
| 1949 | 1949 | } |
@@ -1968,7 +1968,7 @@ discard block |
||
| 1968 | 1968 | $return = array_merge( $return, self::array_flatten( $value, $keys ) ); |
| 1969 | 1969 | } else { |
| 1970 | 1970 | if ( $keys === 'keep' ) { |
| 1971 | - $return[ $key ] = $value; |
|
| 1971 | + $return[$key] = $value; |
|
| 1972 | 1972 | } else { |
| 1973 | 1973 | $return[] = $value; |
| 1974 | 1974 | } |
@@ -2021,11 +2021,11 @@ discard block |
||
| 2021 | 2021 | } |
| 2022 | 2022 | |
| 2023 | 2023 | $ver = $default; |
| 2024 | - if ( ! isset( $wp_scripts->registered[ $handle ] ) ) { |
|
| 2024 | + if ( ! isset( $wp_scripts->registered[$handle] ) ) { |
|
| 2025 | 2025 | return $ver; |
| 2026 | 2026 | } |
| 2027 | 2027 | |
| 2028 | - $query = $wp_scripts->registered[ $handle ]; |
|
| 2028 | + $query = $wp_scripts->registered[$handle]; |
|
| 2029 | 2029 | if ( is_object( $query ) && ! empty( $query->ver ) ) { |
| 2030 | 2030 | $ver = $query->ver; |
| 2031 | 2031 | } |
@@ -2131,7 +2131,7 @@ discard block |
||
| 2131 | 2131 | $suffix = 2; |
| 2132 | 2132 | do { |
| 2133 | 2133 | $key_check = $key . $separator . $suffix; |
| 2134 | - ++$suffix; |
|
| 2134 | + ++ $suffix; |
|
| 2135 | 2135 | } while ( in_array( $key_check, $similar_keys, true ) ); |
| 2136 | 2136 | |
| 2137 | 2137 | $key = $key_check; |
@@ -2239,7 +2239,7 @@ discard block |
||
| 2239 | 2239 | |
| 2240 | 2240 | foreach ( array( 'name', 'description' ) as $var ) { |
| 2241 | 2241 | $default_val = isset( $record->{$var} ) ? $record->{$var} : ''; |
| 2242 | - $values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
| 2242 | + $values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
| 2243 | 2243 | unset( $var, $default_val ); |
| 2244 | 2244 | } |
| 2245 | 2245 | |
@@ -2297,9 +2297,9 @@ discard block |
||
| 2297 | 2297 | } |
| 2298 | 2298 | }//end if |
| 2299 | 2299 | |
| 2300 | - $field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type; |
|
| 2301 | - if ( isset( $post_values['item_meta'][ $field->id ] ) ) { |
|
| 2302 | - $new_value = $post_values['item_meta'][ $field->id ]; |
|
| 2300 | + $field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type; |
|
| 2301 | + if ( isset( $post_values['item_meta'][$field->id] ) ) { |
|
| 2302 | + $new_value = $post_values['item_meta'][$field->id]; |
|
| 2303 | 2303 | self::unserialize_or_decode( $new_value ); |
| 2304 | 2304 | } else { |
| 2305 | 2305 | $new_value = $meta_value; |
@@ -2320,7 +2320,7 @@ discard block |
||
| 2320 | 2320 | |
| 2321 | 2321 | $field_array = array_merge( (array) $field->field_options, $field_array ); |
| 2322 | 2322 | |
| 2323 | - $values['fields'][ $field->id ] = $field_array; |
|
| 2323 | + $values['fields'][$field->id] = $field_array; |
|
| 2324 | 2324 | } |
| 2325 | 2325 | |
| 2326 | 2326 | /** |
@@ -2370,11 +2370,11 @@ discard block |
||
| 2370 | 2370 | } |
| 2371 | 2371 | |
| 2372 | 2372 | foreach ( $form->options as $opt => $value ) { |
| 2373 | - if ( isset( $post_values[ $opt ] ) ) { |
|
| 2374 | - $values[ $opt ] = $post_values[ $opt ]; |
|
| 2375 | - self::unserialize_or_decode( $values[ $opt ] ); |
|
| 2373 | + if ( isset( $post_values[$opt] ) ) { |
|
| 2374 | + $values[$opt] = $post_values[$opt]; |
|
| 2375 | + self::unserialize_or_decode( $values[$opt] ); |
|
| 2376 | 2376 | } else { |
| 2377 | - $values[ $opt ] = $value; |
|
| 2377 | + $values[$opt] = $value; |
|
| 2378 | 2378 | } |
| 2379 | 2379 | } |
| 2380 | 2380 | |
@@ -2388,8 +2388,8 @@ discard block |
||
| 2388 | 2388 | $form_defaults = FrmFormsHelper::get_default_opts(); |
| 2389 | 2389 | |
| 2390 | 2390 | foreach ( $form_defaults as $opt => $default ) { |
| 2391 | - if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) { |
|
| 2392 | - $values[ $opt ] = ( $post_values && isset( $post_values['options'][ $opt ] ) ) ? $post_values['options'][ $opt ] : $default; |
|
| 2391 | + if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) { |
|
| 2392 | + $values[$opt] = ( $post_values && isset( $post_values['options'][$opt] ) ) ? $post_values['options'][$opt] : $default; |
|
| 2393 | 2393 | } |
| 2394 | 2394 | |
| 2395 | 2395 | unset( $opt, $default ); |
@@ -2400,8 +2400,8 @@ discard block |
||
| 2400 | 2400 | } |
| 2401 | 2401 | |
| 2402 | 2402 | foreach ( array( 'before', 'after', 'submit' ) as $h ) { |
| 2403 | - if ( ! isset( $values[ $h . '_html' ] ) ) { |
|
| 2404 | - $values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) ); |
|
| 2403 | + if ( ! isset( $values[$h . '_html'] ) ) { |
|
| 2404 | + $values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) ); |
|
| 2405 | 2405 | } |
| 2406 | 2406 | unset( $h ); |
| 2407 | 2407 | } |
@@ -2579,25 +2579,25 @@ discard block |
||
| 2579 | 2579 | if ( ! is_numeric( $levels ) ) { |
| 2580 | 2580 | // Show time in specified unit. |
| 2581 | 2581 | $levels = self::get_unit( $levels ); |
| 2582 | - if ( isset( $time_strings[ $levels ] ) ) { |
|
| 2582 | + if ( isset( $time_strings[$levels] ) ) { |
|
| 2583 | 2583 | $diff = array( |
| 2584 | 2584 | $levels => self::time_format( $levels, $diff ), |
| 2585 | 2585 | ); |
| 2586 | 2586 | $time_strings = array( |
| 2587 | - $levels => $time_strings[ $levels ], |
|
| 2587 | + $levels => $time_strings[$levels], |
|
| 2588 | 2588 | ); |
| 2589 | 2589 | } |
| 2590 | 2590 | $levels = 1; |
| 2591 | 2591 | } |
| 2592 | 2592 | |
| 2593 | 2593 | foreach ( $time_strings as $k => $v ) { |
| 2594 | - if ( isset( $diff[ $k ] ) && $diff[ $k ] ) { |
|
| 2595 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] ); |
|
| 2596 | - } elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) { |
|
| 2594 | + if ( isset( $diff[$k] ) && $diff[$k] ) { |
|
| 2595 | + $time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] ); |
|
| 2596 | + } elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) { |
|
| 2597 | 2597 | // Account for 0. |
| 2598 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1]; |
|
| 2598 | + $time_strings[$k] = $diff[$k] . ' ' . $v[1]; |
|
| 2599 | 2599 | } else { |
| 2600 | - unset( $time_strings[ $k ] ); |
|
| 2600 | + unset( $time_strings[$k] ); |
|
| 2601 | 2601 | } |
| 2602 | 2602 | } |
| 2603 | 2603 | |
@@ -2616,8 +2616,8 @@ discard block |
||
| 2616 | 2616 | 'y' => 'y', |
| 2617 | 2617 | 'd' => 'days', |
| 2618 | 2618 | ); |
| 2619 | - if ( isset( $return[ $unit ] ) ) { |
|
| 2620 | - return $diff[ $return[ $unit ] ]; |
|
| 2619 | + if ( isset( $return[$unit] ) ) { |
|
| 2620 | + return $diff[$return[$unit]]; |
|
| 2621 | 2621 | } |
| 2622 | 2622 | |
| 2623 | 2623 | $total = $diff['days'] * self::convert_time( 'd', $unit ); |
@@ -2625,11 +2625,11 @@ discard block |
||
| 2625 | 2625 | $times = array( 'h', 'i', 's' ); |
| 2626 | 2626 | |
| 2627 | 2627 | foreach ( $times as $time ) { |
| 2628 | - if ( ! isset( $diff[ $time ] ) ) { |
|
| 2628 | + if ( ! isset( $diff[$time] ) ) { |
|
| 2629 | 2629 | continue; |
| 2630 | 2630 | } |
| 2631 | 2631 | |
| 2632 | - $total += $diff[ $time ] * self::convert_time( $time, $unit ); |
|
| 2632 | + $total += $diff[$time] * self::convert_time( $time, $unit ); |
|
| 2633 | 2633 | } |
| 2634 | 2634 | |
| 2635 | 2635 | return floor( $total ); |
@@ -2649,7 +2649,7 @@ discard block |
||
| 2649 | 2649 | 'y' => DAY_IN_SECONDS * 365.25, |
| 2650 | 2650 | ); |
| 2651 | 2651 | |
| 2652 | - return $convert[ $from ] / $convert[ $to ]; |
|
| 2652 | + return $convert[$from] / $convert[$to]; |
|
| 2653 | 2653 | } |
| 2654 | 2654 | |
| 2655 | 2655 | /** |
@@ -2657,7 +2657,7 @@ discard block |
||
| 2657 | 2657 | */ |
| 2658 | 2658 | private static function get_unit( $unit ) { |
| 2659 | 2659 | $units = self::get_time_strings(); |
| 2660 | - if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) { |
|
| 2660 | + if ( isset( $units[$unit] ) || is_numeric( $unit ) ) { |
|
| 2661 | 2661 | return $unit; |
| 2662 | 2662 | } |
| 2663 | 2663 | |
@@ -2774,17 +2774,17 @@ discard block |
||
| 2774 | 2774 | |
| 2775 | 2775 | case 1: |
| 2776 | 2776 | $l2 = $name; |
| 2777 | - self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] ); |
|
| 2777 | + self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] ); |
|
| 2778 | 2778 | break; |
| 2779 | 2779 | |
| 2780 | 2780 | case 2: |
| 2781 | 2781 | $l3 = $name; |
| 2782 | - self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] ); |
|
| 2782 | + self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] ); |
|
| 2783 | 2783 | break; |
| 2784 | 2784 | |
| 2785 | 2785 | case 3: |
| 2786 | 2786 | $l4 = $name; |
| 2787 | - self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] ); |
|
| 2787 | + self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] ); |
|
| 2788 | 2788 | } |
| 2789 | 2789 | |
| 2790 | 2790 | unset( $this_val, $n ); |
@@ -2803,8 +2803,8 @@ discard block |
||
| 2803 | 2803 | public static function add_value_to_array( $name, $l1, $val, &$vars ) { |
| 2804 | 2804 | if ( $name == '' ) { |
| 2805 | 2805 | $vars[] = $val; |
| 2806 | - } elseif ( ! isset( $vars[ $l1 ] ) ) { |
|
| 2807 | - $vars[ $l1 ] = $val; |
|
| 2806 | + } elseif ( ! isset( $vars[$l1] ) ) { |
|
| 2807 | + $vars[$l1] = $val; |
|
| 2808 | 2808 | } |
| 2809 | 2809 | } |
| 2810 | 2810 | |
@@ -2821,7 +2821,7 @@ discard block |
||
| 2821 | 2821 | 'new_tab' => __( 'This option will open the link in a new browser tab. Please note that some popup blockers may prevent this from happening, in which case the link will be displayed.', 'formidable' ), |
| 2822 | 2822 | ); |
| 2823 | 2823 | |
| 2824 | - if ( ! isset( $tooltips[ $name ] ) ) { |
|
| 2824 | + if ( ! isset( $tooltips[$name] ) ) { |
|
| 2825 | 2825 | return; |
| 2826 | 2826 | } |
| 2827 | 2827 | |
@@ -2831,7 +2831,7 @@ discard block |
||
| 2831 | 2831 | echo ' class="frm_help"'; |
| 2832 | 2832 | } |
| 2833 | 2833 | |
| 2834 | - echo ' title="' . esc_attr( $tooltips[ $name ] ); |
|
| 2834 | + echo ' title="' . esc_attr( $tooltips[$name] ); |
|
| 2835 | 2835 | |
| 2836 | 2836 | if ( 'open' != $class ) { |
| 2837 | 2837 | echo '"'; |
@@ -2890,13 +2890,13 @@ discard block |
||
| 2890 | 2890 | } |
| 2891 | 2891 | |
| 2892 | 2892 | private static function prepare_action_slashes( $val, $key, &$post_content ) { |
| 2893 | - if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) { |
|
| 2893 | + if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) { |
|
| 2894 | 2894 | return; |
| 2895 | 2895 | } |
| 2896 | 2896 | |
| 2897 | 2897 | if ( is_array( $val ) ) { |
| 2898 | 2898 | foreach ( $val as $k1 => $v1 ) { |
| 2899 | - self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] ); |
|
| 2899 | + self::prepare_action_slashes( $v1, $k1, $post_content[$key] ); |
|
| 2900 | 2900 | unset( $k1, $v1 ); |
| 2901 | 2901 | } |
| 2902 | 2902 | } else { |
@@ -2904,7 +2904,7 @@ discard block |
||
| 2904 | 2904 | $val = stripslashes( $val ); |
| 2905 | 2905 | |
| 2906 | 2906 | // Add backslashes before double quotes and forward slashes only |
| 2907 | - $post_content[ $key ] = addcslashes( $val, '"\\/' ); |
|
| 2907 | + $post_content[$key] = addcslashes( $val, '"\\/' ); |
|
| 2908 | 2908 | } |
| 2909 | 2909 | } |
| 2910 | 2910 | |
@@ -3025,14 +3025,14 @@ discard block |
||
| 3025 | 3025 | continue; |
| 3026 | 3026 | } |
| 3027 | 3027 | $key = $input['name']; |
| 3028 | - if ( isset( $formatted[ $key ] ) ) { |
|
| 3029 | - if ( is_array( $formatted[ $key ] ) ) { |
|
| 3030 | - $formatted[ $key ][] = $input['value']; |
|
| 3028 | + if ( isset( $formatted[$key] ) ) { |
|
| 3029 | + if ( is_array( $formatted[$key] ) ) { |
|
| 3030 | + $formatted[$key][] = $input['value']; |
|
| 3031 | 3031 | } else { |
| 3032 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
| 3032 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
| 3033 | 3033 | } |
| 3034 | 3034 | } else { |
| 3035 | - $formatted[ $key ] = $input['value']; |
|
| 3035 | + $formatted[$key] = $input['value']; |
|
| 3036 | 3036 | } |
| 3037 | 3037 | } |
| 3038 | 3038 | |
@@ -3729,8 +3729,8 @@ discard block |
||
| 3729 | 3729 | } |
| 3730 | 3730 | |
| 3731 | 3731 | foreach ( $keys as $key ) { |
| 3732 | - if ( isset( $values[ $key ] ) ) { |
|
| 3733 | - $values[ $key ] = self::kses( $values[ $key ], 'all' ); |
|
| 3732 | + if ( isset( $values[$key] ) ) { |
|
| 3733 | + $values[$key] = self::kses( $values[$key], 'all' ); |
|
| 3734 | 3734 | } |
| 3735 | 3735 | } |
| 3736 | 3736 | |
@@ -3889,7 +3889,7 @@ discard block |
||
| 3889 | 3889 | return 0; |
| 3890 | 3890 | } |
| 3891 | 3891 | |
| 3892 | - return strlen( $parts[ count( $parts ) - 1 ] ); |
|
| 3892 | + return strlen( $parts[count( $parts ) - 1] ); |
|
| 3893 | 3893 | } |
| 3894 | 3894 | |
| 3895 | 3895 | /** |
@@ -4122,7 +4122,7 @@ discard block |
||
| 4122 | 4122 | * @return string |
| 4123 | 4123 | */ |
| 4124 | 4124 | public static function copy_for_lite_license() { |
| 4125 | - $message = __( 'You\'re using Formidable Forms Lite - no license needed. Enjoy!', 'formidable' ) . ' |
|