@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $form_ids = $this->get_form_ids( $form_id ); |
| 135 | 135 | $s_query['it.form_id'] = count( $form_ids ) > 1 ? $form_ids : $form_ids[0]; |
| 136 | 136 | } else { |
| 137 | - $s_query[] = array( |
|
| 137 | + $s_query[] = array( |
|
| 138 | 138 | 'or' => 1, |
| 139 | 139 | 'parent_form_id' => null, |
| 140 | 140 | 'parent_form_id <' => 1, |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | $r = "<tr id='item-action-{$item->id}'$style>"; |
| 285 | 285 | |
| 286 | - list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
|
| 286 | + list( $columns, $hidden,, $primary ) = $this->get_column_info(); |
|
| 287 | 287 | $action_col = false; |
| 288 | 288 | $action_columns = $this->get_action_columns(); |
| 289 | 289 | |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | 'secondary-button-role' => 'button', |
| 101 | 101 | 'secondary-button-skip-step' => true, |
| 102 | 102 | ); |
| 103 | - $args = wp_parse_args( $args, $defaults ); |
|
| 103 | + $args = wp_parse_args( $args, $defaults ); |
|
| 104 | 104 | |
| 105 | 105 | // Set the primary button attributes. |
| 106 | 106 | $primary_button_attributes = array( |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | // Build total for each currency. |
| 151 | 151 | foreach ( $payment_data['total'] as $currency => $amount ) { |
| 152 | - $stats[ 'payments_total_' . $currency ] = array( |
|
| 152 | + $stats['payments_total_' . $currency] = array( |
|
| 153 | 153 | // translators: currency name. |
| 154 | 154 | 'label' => sprintf( __( 'Total %s', 'formidable' ), strtoupper( $currency ) ), |
| 155 | 155 | 'count' => $amount, |
@@ -171,23 +171,23 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | // Compare total for each currency. |
| 173 | 173 | foreach ( $payment_data['total'] as $currency => $amount ) { |
| 174 | - if ( ! isset( $prev_payment_data['total'][ $currency ] ) ) { |
|
| 175 | - $stats[ 'payments_total_' . $currency ]['compare'] = 1; |
|
| 174 | + if ( ! isset( $prev_payment_data['total'][$currency] ) ) { |
|
| 175 | + $stats['payments_total_' . $currency]['compare'] = 1; |
|
| 176 | 176 | continue; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - $stats[ 'payments_total_' . $currency ]['compare'] = $this->get_compare_diff( $amount, $prev_payment_data['total'][ $currency ] ); |
|
| 180 | - unset( $prev_payment_data['total'][ $currency ] ); |
|
| 179 | + $stats['payments_total_' . $currency]['compare'] = $this->get_compare_diff( $amount, $prev_payment_data['total'][$currency] ); |
|
| 180 | + unset( $prev_payment_data['total'][$currency] ); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | // If prev month has more currencies. |
| 184 | 184 | foreach ( $prev_payment_data['total'] as $currency => $amount ) { |
| 185 | - $stats[ 'payments_total_' . $currency ] = array( |
|
| 185 | + $stats['payments_total_' . $currency] = array( |
|
| 186 | 186 | // translators: currency name. |
| 187 | 187 | 'label' => sprintf( __( 'Total %s', 'formidable' ), strtoupper( $currency ) ), |
| 188 | 188 | 'count' => 0, |
| 189 | 189 | 'display' => $this->get_formatted_price( 0, $currency ), |
| 190 | - 'compare' => -1, |
|
| 190 | + 'compare' => - 1, |
|
| 191 | 191 | ); |
| 192 | 192 | } |
| 193 | 193 | }//end if |
@@ -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 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | $templates = $this->get_api_info(); |
| 96 | 96 | $contact_form = 20872734; |
| 97 | - return isset( $templates[ $contact_form ] ) && ! empty( $templates[ $contact_form ]['url'] ); |
|
| 97 | + return isset( $templates[$contact_form] ) && ! empty( $templates[$contact_form]['url'] ); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -169,15 +169,15 @@ discard block |
||
| 169 | 169 | continue; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - $data['urlByKey'][ $template['key'] ] = $template['url']; |
|
| 172 | + $data['urlByKey'][$template['key']] = $template['url']; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - if ( ! isset( $data['urlByKey'][ $key ] ) ) { |
|
| 175 | + if ( ! isset( $data['urlByKey'][$key] ) ) { |
|
| 176 | 176 | $error = new WP_Error( 400, 'We were unable to retrieve the template' ); |
| 177 | 177 | wp_send_json_error( $error ); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - $data['url'] = $data['urlByKey'][ $key ]; |
|
| 180 | + $data['url'] = $data['urlByKey'][$key]; |
|
| 181 | 181 | }//end if |
| 182 | 182 | |
| 183 | 183 | wp_send_json_success( $data ); |
@@ -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 | ); |