@@ -80,20 +80,20 @@ discard block |
||
| 80 | 80 | 'name' => sprintf( |
| 81 | 81 | /* translators: Formidable addon name */ |
| 82 | 82 | esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ), |
| 83 | - $addon_list[ $matching_addon ]['name'] |
|
| 83 | + $addon_list[$matching_addon]['name'] |
|
| 84 | 84 | ), |
| 85 | - 'addon' => $addon_list[ $matching_addon ]['slug'], |
|
| 86 | - 'short_description' => $addon_list[ $matching_addon ]['excerpt'], |
|
| 85 | + 'addon' => $addon_list[$matching_addon]['slug'], |
|
| 86 | + 'short_description' => $addon_list[$matching_addon]['excerpt'], |
|
| 87 | 87 | 'slug' => self::$slug, |
| 88 | - 'version' => $addon_list[ $matching_addon ]['version'], |
|
| 88 | + 'version' => $addon_list[$matching_addon]['version'], |
|
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - if ( ! empty( $addon_list[ $matching_addon ]['external'] ) ) { |
|
| 91 | + if ( ! empty( $addon_list[$matching_addon]['external'] ) ) { |
|
| 92 | 92 | unset( $overrides['name'] ); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | // Splice in the base addon data. |
| 96 | - $inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides ); |
|
| 96 | + $inject = array_merge( $inject, $addon_list[$matching_addon], $overrides ); |
|
| 97 | 97 | |
| 98 | 98 | // Add it to the top of the list. |
| 99 | 99 | array_unshift( $result->plugins, $inject ); |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | // Plugin installed, active, feature not enabled; prompt to enable. |
| 309 | 309 | if ( ! $is_active && $is_installed ) { |
| 310 | 310 | if ( current_user_can( 'activate_plugins' ) ) { |
| 311 | - $activate_url = add_query_arg( |
|
| 311 | + $activate_url = add_query_arg( |
|
| 312 | 312 | array( |
| 313 | 313 | 'action' => 'activate', |
| 314 | 314 | '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin['plugin'] ), |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | */ |
| 353 | 353 | protected function is_installed( $plugin ) { |
| 354 | 354 | $all_plugins = FrmAppHelper::get_plugins(); |
| 355 | - return isset( $all_plugins[ $plugin ] ); |
|
| 355 | + return isset( $all_plugins[$plugin] ); |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | private function update_next_execution_time() { |
| 86 | 86 | $config_option_name = $this->config['config-option-name']; |
| 87 | 87 | |
| 88 | - $this->options_data[ $config_option_name ] = $this->get_next_execution(); |
|
| 88 | + $this->options_data[$config_option_name] = $this->get_next_execution(); |
|
| 89 | 89 | $this->update_options_data(); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | * @return bool |
| 105 | 105 | */ |
| 106 | 106 | private function is_time_to_execute() { |
| 107 | - if ( ! isset( $this->options_data[ $this->config['config-option-name'] ] ) ) { |
|
| 107 | + if ( ! isset( $this->options_data[$this->config['config-option-name']] ) ) { |
|
| 108 | 108 | return true; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - $options = $this->options_data[ $this->config['config-option-name'] ]; |
|
| 111 | + $options = $this->options_data[$this->config['config-option-name']]; |
|
| 112 | 112 | |
| 113 | 113 | return ! ( isset( $options['timestamp'] ) && (int) $options['timestamp'] > $this->get_time() ); |
| 114 | 114 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $to = $this->prepare_email_setting( $this->settings['email_to'], $user_id_args ); |
| 163 | 163 | $to = $this->explode_emails( $to ); |
| 164 | 164 | |
| 165 | - $where = array( |
|
| 165 | + $where = array( |
|
| 166 | 166 | 'it.field_id !' => 0, |
| 167 | 167 | 'it.item_id' => $this->entry->id, |
| 168 | 168 | ); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | 'entry' => $this->entry, |
| 173 | 173 | 'form' => $this->form, |
| 174 | 174 | ); |
| 175 | - $to = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args ); |
|
| 175 | + $to = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args ); |
|
| 176 | 176 | |
| 177 | 177 | $this->to = array_unique( (array) $to ); |
| 178 | 178 | |
@@ -702,11 +702,11 @@ discard block |
||
| 702 | 702 | $name = trim( str_replace( $email, '', $val ) ); |
| 703 | 703 | } else { |
| 704 | 704 | // If user enters a name without an email |
| 705 | - unset( $recipients[ $key ] ); |
|
| 705 | + unset( $recipients[$key] ); |
|
| 706 | 706 | continue; |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | - $recipients[ $key ] = $this->format_from_email( $name, $email ); |
|
| 709 | + $recipients[$key] = $this->format_from_email( $name, $email ); |
|
| 710 | 710 | }//end foreach |
| 711 | 711 | |
| 712 | 712 | return $recipients; |
@@ -856,7 +856,7 @@ discard block |
||
| 856 | 856 | ); |
| 857 | 857 | |
| 858 | 858 | // Remove phone number from to addresses |
| 859 | - unset( $this->to[ $key ] ); |
|
| 859 | + unset( $this->to[$key] ); |
|
| 860 | 860 | }//end if |
| 861 | 861 | }//end foreach |
| 862 | 862 | } |
@@ -113,8 +113,8 @@ |
||
| 113 | 113 | $label = 'category' === $term->taxonomy || 'tag' === $term->taxonomy ? $term->taxonomy : 'term'; |
| 114 | 114 | ?> |
| 115 | 115 | <term><term_id><?php echo esc_html( $term->term_id ); ?></term_id><term_taxonomy><?php echo esc_html( $term->taxonomy ); ?></term_taxonomy><?php |
| 116 | - if ( ! empty( $parent_slugs[ $term->parent ] ) ) { |
|
| 117 | - echo '<term_parent>' . esc_html( $parent_slugs[ $term->parent ] ) . '</term_parent>'; |
|
| 116 | + if ( ! empty( $parent_slugs[$term->parent] ) ) { |
|
| 117 | + echo '<term_parent>' . esc_html( $parent_slugs[$term->parent] ) . '</term_parent>'; |
|
| 118 | 118 | } |
| 119 | 119 | if ( ! empty( $term->name ) ) { |
| 120 | 120 | echo '<term_name>' . FrmXMLHelper::cdata( $term->name ) . '</term_name>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
@@ -138,11 +138,11 @@ discard block |
||
| 138 | 138 | private static function has_dark_background( $style ) { |
| 139 | 139 | $key = 'fieldset_bg_color'; |
| 140 | 140 | |
| 141 | - if ( empty( $style->post_content[ $key ] ) ) { |
|
| 141 | + if ( empty( $style->post_content[$key] ) ) { |
|
| 142 | 142 | return false; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $color = $style->post_content[ $key ]; |
|
| 145 | + $color = $style->post_content[$key]; |
|
| 146 | 146 | |
| 147 | 147 | if ( 0 === strpos( $color, 'rgba' ) ) { |
| 148 | 148 | preg_match_all( '/([\\d.]+)/', $color, $matches ); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @param stdClass $style_object |
| 202 | 202 | * @param array $style |
| 203 | 203 | */ |
| 204 | - $param_filter = function ( $params, $args ) use ( $style_object, $style ) { |
|
| 204 | + $param_filter = function( $params, $args ) use ( $style_object, $style ) { |
|
| 205 | 205 | if ( $args['style'] !== $style_object ) { |
| 206 | 206 | return $params; |
| 207 | 207 | } |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | ), |
| 215 | 215 | '/style-templates/' . $style['slug'] |
| 216 | 216 | ); |
| 217 | - $params['data-requires'] = FrmFormsHelper::get_plan_required( $style ); |
|
| 217 | + $params['data-requires'] = FrmFormsHelper::get_plan_required( $style ); |
|
| 218 | 218 | return $params; |
| 219 | 219 | }; |
| 220 | 220 | } else { |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | * @param array $style |
| 226 | 226 | * @return array |
| 227 | 227 | */ |
| 228 | - $param_filter = function ( $params ) use ( $style ) { |
|
| 228 | + $param_filter = function( $params ) use ( $style ) { |
|
| 229 | 229 | $params['data-template-key'] = $style['slug']; |
| 230 | 230 | return $params; |
| 231 | 231 | }; |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | continue; |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | - $value = $style->post_content[ $key ]; |
|
| 280 | + $value = $style->post_content[$key]; |
|
| 281 | 281 | |
| 282 | 282 | $is_hex = in_array( $key, $color_settings, true ) && $value && '#' !== $value[0] && false === strpos( $value, 'rgb' ) && $value !== 'transparent'; |
| 283 | 283 | if ( $is_hex ) { |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | * @param int $count Used for pagination. |
| 397 | 397 | * @return void |
| 398 | 398 | */ |
| 399 | - function ( $style, $key ) { |
|
| 399 | + function( $style, $key ) { |
|
| 400 | 400 | if ( ! is_numeric( $key ) ) { |
| 401 | 401 | // Skip active_sub/expires keys. |
| 402 | 402 | return; |
@@ -423,10 +423,10 @@ discard block |
||
| 423 | 423 | * @param int $count Used for pagination. |
| 424 | 424 | * @return void |
| 425 | 425 | */ |
| 426 | - function ( $style ) use ( &$count ) { |
|
| 426 | + function( $style ) use ( &$count ) { |
|
| 427 | 427 | $hidden = $count > self::PAGE_SIZE - 1; |
| 428 | 428 | $this->echo_style_card( $style, $hidden ); |
| 429 | - ++$count; |
|
| 429 | + ++ $count; |
|
| 430 | 430 | } |
| 431 | 431 | ); |
| 432 | 432 | |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | * @param WP_Post $style |
| 485 | 485 | * @return bool |
| 486 | 486 | */ |
| 487 | - function ( $style ) { |
|
| 487 | + function( $style ) { |
|
| 488 | 488 | return $this->default_style->ID !== $style->ID; |
| 489 | 489 | } |
| 490 | 490 | ); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @param array|object $field |
| 75 | 75 | * @return string |
| 76 | 76 | */ |
| 77 | - function ( $position, $field ) { |
|
| 77 | + function( $position, $field ) { |
|
| 78 | 78 | if ( is_array( $field ) ) { |
| 79 | 79 | $this->default_label_position_field_ids[] = (int) $field['id']; |
| 80 | 80 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @param array|object $field |
| 92 | 92 | * @return string |
| 93 | 93 | */ |
| 94 | - function ( $classes, $field ) { |
|
| 94 | + function( $classes, $field ) { |
|
| 95 | 95 | if ( is_array( $field ) && in_array( (int) $field['id'], $this->default_label_position_field_ids, true ) ) { |
| 96 | 96 | $classes .= ' frm-default-label-position'; |
| 97 | 97 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param string $target_field_type |
| 119 | 119 | * @return bool |
| 120 | 120 | */ |
| 121 | - function ( $show, $field_type ) { |
|
| 121 | + function( $show, $field_type ) { |
|
| 122 | 122 | if ( 'captcha' === $field_type ) { |
| 123 | 123 | $show = false; |
| 124 | 124 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * @param int $form_id |
| 147 | 147 | * @return stdClass|null |
| 148 | 148 | */ |
| 149 | - function ( $form ) { |
|
| 149 | + function( $form ) { |
|
| 150 | 150 | if ( is_object( $form ) && is_array( $form->options ) ) { |
| 151 | 151 | $form->options['js_validate'] = false; |
| 152 | 152 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | $frm_settings = FrmAppHelper::get_settings(); |
| 198 | 198 | if ( 'none' === $frm_settings->load_style ) { |
| 199 | - $notes[] = function () { |
|
| 199 | + $notes[] = function() { |
|
| 200 | 200 | printf( |
| 201 | 201 | // translators: %1$s: Anchor tag open, %2$s: Anchor tag close. |
| 202 | 202 | esc_html__( 'Formidable styles are disabled. This needs to be enabled in %1$sGlobal Settings%2$s.', 'formidable' ), |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | return; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - unset( $dependencies[ $index ] ); |
|
| 357 | + unset( $dependencies[$index] ); |
|
| 358 | 358 | $dependencies = array_values( $dependencies ); |
| 359 | 359 | |
| 360 | 360 | $styles->registered['wp-admin']->deps = $dependencies; |
@@ -223,8 +223,8 @@ discard block |
||
| 223 | 223 | return $this->get_pagenum(); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - if ( isset( $this->_pagination_args[ $key ] ) ) { |
|
| 227 | - return $this->_pagination_args[ $key ]; |
|
| 226 | + if ( isset( $this->_pagination_args[$key] ) ) { |
|
| 227 | + return $this->_pagination_args[$key]; |
|
| 228 | 228 | } |
| 229 | 229 | } |
| 230 | 230 | |
@@ -269,8 +269,8 @@ discard block |
||
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | private function hidden_search_inputs( $param_name ) { |
| 272 | - if ( ! empty( $_REQUEST[ $param_name ] ) ) { |
|
| 273 | - $value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) ); |
|
| 272 | + if ( ! empty( $_REQUEST[$param_name] ) ) { |
|
| 273 | + $value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) ); |
|
| 274 | 274 | echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />'; |
| 275 | 275 | } |
| 276 | 276 | } |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | |
| 313 | 313 | echo "<ul class='subsubsub'>\n"; |
| 314 | 314 | foreach ( $views as $class => $view ) { |
| 315 | - $views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
| 315 | + $views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
| 316 | 316 | } |
| 317 | 317 | echo implode( " |</li>\n", $views ) . "</li>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 318 | 318 | echo '</ul>'; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | |
| 462 | 462 | $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">'; |
| 463 | 463 | foreach ( $actions as $action => $link ) { |
| 464 | - ++$i; |
|
| 464 | + ++ $i; |
|
| 465 | 465 | $sep = $i == $action_count ? '' : ' | '; |
| 466 | 466 | $out .= "<span class='$action'>$link$sep</span>"; |
| 467 | 467 | } |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | 'next' => __( 'Next page', 'formidable' ), |
| 685 | 685 | ); |
| 686 | 686 | |
| 687 | - return $labels[ $link ]; |
|
| 687 | + return $labels[$link]; |
|
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | private function current_url() { |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | |
| 775 | 775 | // If the primary column doesn't exist fall back to the |
| 776 | 776 | // first non-checkbox column. |
| 777 | - if ( ! isset( $columns[ $default ] ) ) { |
|
| 777 | + if ( ! isset( $columns[$default] ) ) { |
|
| 778 | 778 | $default = self::get_default_primary_column_name(); |
| 779 | 779 | } |
| 780 | 780 | |
@@ -788,7 +788,7 @@ discard block |
||
| 788 | 788 | */ |
| 789 | 789 | $column = apply_filters( 'list_table_primary_column', $default, $this->screen->id ); |
| 790 | 790 | |
| 791 | - if ( empty( $column ) || ! isset( $columns[ $column ] ) ) { |
|
| 791 | + if ( empty( $column ) || ! isset( $columns[$column] ) ) { |
|
| 792 | 792 | $column = $default; |
| 793 | 793 | } |
| 794 | 794 | |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | // In 4.3, we added a fourth argument for primary column. |
| 810 | 810 | $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); |
| 811 | 811 | foreach ( $this->_column_headers as $key => $value ) { |
| 812 | - $column_headers[ $key ] = $value; |
|
| 812 | + $column_headers[$key] = $value; |
|
| 813 | 813 | } |
| 814 | 814 | |
| 815 | 815 | return $column_headers; |
@@ -842,7 +842,7 @@ discard block |
||
| 842 | 842 | $data[1] = false; |
| 843 | 843 | } |
| 844 | 844 | |
| 845 | - $sortable[ $id ] = $data; |
|
| 845 | + $sortable[$id] = $data; |
|
| 846 | 846 | } |
| 847 | 847 | |
| 848 | 848 | $primary = $this->get_primary_column_name(); |
@@ -898,7 +898,7 @@ discard block |
||
| 898 | 898 | static $cb_counter = 1; |
| 899 | 899 | $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All', 'formidable' ) . '</label>'; |
| 900 | 900 | $columns['cb'] .= '<input id="cb-select-all-' . esc_attr( $cb_counter ) . '" type="checkbox" />'; |
| 901 | - ++$cb_counter; |
|
| 901 | + ++ $cb_counter; |
|
| 902 | 902 | } |
| 903 | 903 | |
| 904 | 904 | foreach ( $columns as $column_key => $column_display_name ) { |
@@ -920,8 +920,8 @@ discard block |
||
| 920 | 920 | $class[] = 'column-primary'; |
| 921 | 921 | } |
| 922 | 922 | |
| 923 | - if ( isset( $sortable[ $column_key ] ) ) { |
|
| 924 | - list( $orderby, $desc_first ) = $sortable[ $column_key ]; |
|
| 923 | + if ( isset( $sortable[$column_key] ) ) { |
|
| 924 | + list( $orderby, $desc_first ) = $sortable[$column_key]; |
|
| 925 | 925 | |
| 926 | 926 | if ( $current_orderby == $orderby ) { |
| 927 | 927 | // The sorted column. The `aria-sort` attribute must be set only on the sorted column. |
@@ -1034,7 +1034,7 @@ discard block |
||
| 1034 | 1034 | * @return bool Returns true if the setting is not set or if it is not false; otherwise, returns false. |
| 1035 | 1035 | */ |
| 1036 | 1036 | protected function should_display( $args, $settings ) { |
| 1037 | - return ! isset( $args[ $settings ] ) || false !== $args[ $settings ]; |
|
| 1037 | + return ! isset( $args[$settings] ) || false !== $args[$settings]; |
|
| 1038 | 1038 | } |
| 1039 | 1039 | |
| 1040 | 1040 | /** |
@@ -14,20 +14,26 @@ |
||
| 14 | 14 | <h4><?php echo esc_html( $counter['heading'] ); ?></h4> |
| 15 | 15 | <?php if ( isset( $counter['cta'] ) && isset( $counter['cta']['display'] ) && true === $counter['cta']['display'] ) : ?> |
| 16 | 16 | <a href="<?php echo esc_url( $counter['cta']['link'] ); ?>"><?php echo esc_html( $counter['cta']['title'] ); ?></a> |
| 17 | - <?php else : ?> |
|
| 17 | + <?php else { |
|
| 18 | + : ?> |
|
| 18 | 19 | <?php if ( 'currency' === $counter['type'] ) : ?> |
| 19 | 20 | <div class="frm-flex-box frm-gap-md"> |
| 20 | 21 | <?php foreach ( $counter['items'] as $item ) : ?> |
| 21 | 22 | <b> |
| 22 | - <?php echo esc_attr( $item['counter_label']['symbol_left'] ); ?> |
|
| 23 | + <?php echo esc_attr( $item['counter_label']['symbol_left'] ); |
|
| 24 | +} |
|
| 25 | +?> |
|
| 23 | 26 | <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> |
| 24 | 27 | <?php echo esc_attr( $item['counter_label']['symbol_right'] ); ?> |
| 25 | 28 | </b> |
| 26 | 29 | <?php endforeach; ?> |
| 27 | 30 | </div> |
| 28 | - <?php else : ?> |
|
| 31 | + <?php else { |
|
| 32 | + : ?> |
|
| 29 | 33 | <b> |
| 30 | - <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> |
|
| 34 | + <span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); |
|
| 35 | +} |
|
| 36 | +?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $counter['counter']; ?>"><?php echo (int) $counter['counter']; ?></span> |
|
| 31 | 37 | </b> |
| 32 | 38 | <?php endif; ?> |
| 33 | 39 | <?php endif; ?> |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | return; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][ $selected_form ] ) ? $form['xml'][ $selected_form ] : ''; |
|
| 166 | + $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][$selected_form] ) ? $form['xml'][$selected_form] : ''; |
|
| 167 | 167 | if ( empty( $selected_xml ) || strpos( $selected_xml, 'http' ) !== 0 ) { |
| 168 | 168 | return; |
| 169 | 169 | } |
@@ -178,8 +178,8 @@ discard block |
||
| 178 | 178 | * @param string $value |
| 179 | 179 | */ |
| 180 | 180 | private static function get_selected_in_form( $form, $value = 'form' ) { |
| 181 | - if ( ! empty( $form ) && ! empty( $form[ $value ] ) ) { |
|
| 182 | - return $form[ $value ]; |
|
| 181 | + if ( ! empty( $form ) && ! empty( $form[$value] ) ) { |
|
| 182 | + return $form[$value]; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | return ''; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | if ( $for === 'view' ) { |
| 211 | - $item_key = is_array( $view_keys ) ? $view_keys[ $form_key ] : $view_keys; |
|
| 211 | + $item_key = is_array( $view_keys ) ? $view_keys[$form_key] : $view_keys; |
|
| 212 | 212 | $shortcode = '[display-frm-data id=%1$s filter=limited]'; |
| 213 | 213 | } elseif ( $for === 'form' ) { |
| 214 | 214 | $item_key = $form_key; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | continue; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - $page_ids[ $for ] = wp_insert_post( |
|
| 226 | + $page_ids[$for] = wp_insert_post( |
|
| 227 | 227 | array( |
| 228 | 228 | 'post_title' => $name, |
| 229 | 229 | 'post_type' => 'page', |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
| 377 | 377 | $file_type = sanitize_option( 'upload_path', $_FILES['frm_import_file']['name'] ); |
| 378 | 378 | $file_type = strtolower( pathinfo( $file_type, PATHINFO_EXTENSION ) ); |
| 379 | - if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) { |
|
| 379 | + if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) { |
|
| 380 | 380 | // allow other file types to be imported |
| 381 | 381 | do_action( 'frm_before_import_' . $file_type ); |
| 382 | 382 | |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | foreach ( $type as $tb_type ) { |
| 471 | 471 | $where = array(); |
| 472 | 472 | $join = ''; |
| 473 | - $table = $tables[ $tb_type ]; |
|
| 473 | + $table = $tables[$tb_type]; |
|
| 474 | 474 | |
| 475 | 475 | $select = $table . '.id'; |
| 476 | 476 | $query_vars = array(); |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | $table . '.parent_form_id' => $args['ids'], |
| 486 | 486 | ); |
| 487 | 487 | } else { |
| 488 | - $where[ $table . '.status !' ] = 'draft'; |
|
| 488 | + $where[$table . '.status !'] = 'draft'; |
|
| 489 | 489 | } |
| 490 | 490 | break; |
| 491 | 491 | case 'actions': |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | case 'items': |
| 499 | 499 | // $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)"; |
| 500 | 500 | if ( $args['ids'] ) { |
| 501 | - $where[ $table . '.form_id' ] = $args['ids']; |
|
| 501 | + $where[$table . '.form_id'] = $args['ids']; |
|
| 502 | 502 | } |
| 503 | 503 | break; |
| 504 | 504 | case 'styles': |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | } |
| 540 | 540 | }//end switch |
| 541 | 541 | |
| 542 | - $records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select ); |
|
| 542 | + $records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select ); |
|
| 543 | 543 | unset( $tb_type ); |
| 544 | 544 | }//end foreach |
| 545 | 545 | |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | $no_export_fields = FrmField::no_save_fields(); |
| 735 | 735 | foreach ( $csv_fields as $k => $f ) { |
| 736 | 736 | if ( in_array( $f->type, $no_export_fields, true ) ) { |
| 737 | - unset( $csv_fields[ $k ] ); |
|
| 737 | + unset( $csv_fields[$k] ); |
|
| 738 | 738 | } |
| 739 | 739 | } |
| 740 | 740 | |