@@ -111,10 +111,10 @@ discard block |
||
111 | 111 | if ( $_POST ) { |
112 | 112 | $repeating = isset( $args['repeating'] ) && $args['repeating']; |
113 | 113 | if ( $repeating ) { |
114 | - if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] ) ) { |
|
114 | + if ( isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field->id] ) ) { |
|
115 | 115 | $value_is_posted = true; |
116 | 116 | } |
117 | - } elseif ( isset( $_POST['item_meta'][ $field->id ] ) ) { |
|
117 | + } elseif ( isset( $_POST['item_meta'][$field->id] ) ) { |
|
118 | 118 | $value_is_posted = true; |
119 | 119 | } |
120 | 120 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | preg_match_all( "/\[(default-message|default_message)\b(.*?)(?:(\/))?\]/s", $message, $shortcodes, PREG_PATTERN_ORDER ); |
145 | 145 | |
146 | 146 | foreach ( $shortcodes[0] as $short_key => $tag ) { |
147 | - $add_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][ $short_key ] ); |
|
147 | + $add_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][$short_key] ); |
|
148 | 148 | if ( ! empty( $add_atts ) ) { |
149 | 149 | $this_atts = array_merge( $atts, $add_atts ); |
150 | 150 | } else { |
@@ -154,14 +154,14 @@ discard block |
||
154 | 154 | $default = FrmEntriesController::show_entry_shortcode( $this_atts ); |
155 | 155 | |
156 | 156 | // Add the default message. |
157 | - $message = str_replace( $shortcodes[0][ $short_key ], $default, $message ); |
|
157 | + $message = str_replace( $shortcodes[0][$short_key], $default, $message ); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | return $message; |
161 | 161 | } |
162 | 162 | |
163 | 163 | public static function prepare_display_value( $entry, $field, $atts ) { |
164 | - $field_value = isset( $entry->metas[ $field->id ] ) ? $entry->metas[ $field->id ] : false; |
|
164 | + $field_value = isset( $entry->metas[$field->id] ) ? $entry->metas[$field->id] : false; |
|
165 | 165 | |
166 | 166 | if ( FrmAppHelper::pro_is_installed() ) { |
167 | 167 | FrmProEntriesHelper::get_dynamic_list_values( $field, $entry, $field_value ); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $child_entries = FrmEntry::getAll( array( 'it.parent_item_id' => $entry->id ) ); |
180 | 180 | } else { |
181 | 181 | // Get all values for this field. |
182 | - $child_values = isset( $entry->metas[ $atts['embedded_field_id'] ] ) ? $entry->metas[ $atts['embedded_field_id'] ] : false; |
|
182 | + $child_values = isset( $entry->metas[$atts['embedded_field_id']] ) ? $entry->metas[$atts['embedded_field_id']] : false; |
|
183 | 183 | |
184 | 184 | if ( $child_values ) { |
185 | 185 | $child_entries = FrmEntry::getAll( array( 'it.id' => (array) $child_values ) ); |
@@ -292,9 +292,9 @@ discard block |
||
292 | 292 | $value = $args['temp_value']; |
293 | 293 | } |
294 | 294 | if ( empty( $args['parent_field_id'] ) ) { |
295 | - $_POST['item_meta'][ $field->id ] = $value; |
|
295 | + $_POST['item_meta'][$field->id] = $value; |
|
296 | 296 | } else { |
297 | - $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] = $value; |
|
297 | + $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field->id] = $value; |
|
298 | 298 | } |
299 | 299 | } |
300 | 300 | |
@@ -302,9 +302,9 @@ discard block |
||
302 | 302 | $field_id = is_object( $field ) ? $field->id : $field; |
303 | 303 | |
304 | 304 | if ( empty( $args['parent_field_id'] ) ) { |
305 | - $value = isset( $_POST['item_meta'][ $field_id ] ) ? $_POST['item_meta'][ $field_id ] : ''; |
|
305 | + $value = isset( $_POST['item_meta'][$field_id] ) ? $_POST['item_meta'][$field_id] : ''; |
|
306 | 306 | } else { |
307 | - $value = isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field_id ] ) ? $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field_id ] : ''; |
|
307 | + $value = isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field_id] ) ? $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field_id] : ''; |
|
308 | 308 | } |
309 | 309 | $value = wp_unslash( $value ); |
310 | 310 | FrmAppHelper::sanitize_value( 'wp_kses_post', $value ); |
@@ -329,12 +329,12 @@ discard block |
||
329 | 329 | self::set_other_repeating_vals( $field, $value, $args ); |
330 | 330 | |
331 | 331 | // Check if there are any posted "Other" values. |
332 | - if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][ $field->id ] ) ) { |
|
332 | + if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][$field->id] ) ) { |
|
333 | 333 | |
334 | 334 | // Save original value. |
335 | 335 | $args['temp_value'] = $value; |
336 | 336 | $args['other'] = true; |
337 | - $other_vals = wp_unslash( $_POST['item_meta']['other'][ $field->id ] ); |
|
337 | + $other_vals = wp_unslash( $_POST['item_meta']['other'][$field->id] ); |
|
338 | 338 | |
339 | 339 | // Set the validation value now |
340 | 340 | self::set_other_validation_val( $value, $other_vals, $field, $args ); |
@@ -356,12 +356,12 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | // Check if there are any other posted "other" values for this field. |
359 | - if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ) ) { |
|
359 | + if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']]['other'][$field->id] ) ) { |
|
360 | 360 | // Save original value |
361 | 361 | $args['temp_value'] = $value; |
362 | 362 | $args['other'] = true; |
363 | 363 | |
364 | - $other_vals = wp_unslash( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ); |
|
364 | + $other_vals = wp_unslash( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']]['other'][$field->id] ); |
|
365 | 365 | |
366 | 366 | // Set the validation value now. |
367 | 367 | self::set_other_validation_val( $value, $other_vals, $field, $args ); |
@@ -398,25 +398,25 @@ discard block |
||
398 | 398 | |
399 | 399 | // Multi-select dropdown. |
400 | 400 | if ( is_array( $value ) ) { |
401 | - $o_key = array_search( $field->options[ $other_key ], $value ); |
|
401 | + $o_key = array_search( $field->options[$other_key], $value ); |
|
402 | 402 | |
403 | 403 | if ( $o_key !== false ) { |
404 | 404 | // Modify the original value so other key will be preserved. |
405 | - $value[ $other_key ] = $value[ $o_key ]; |
|
405 | + $value[$other_key] = $value[$o_key]; |
|
406 | 406 | |
407 | 407 | // By default, the array keys will be numeric for multi-select dropdowns. |
408 | 408 | // If going backwards and forwards between pages, the array key will match the other key. |
409 | 409 | if ( $o_key !== $other_key ) { |
410 | - unset( $value[ $o_key ] ); |
|
410 | + unset( $value[$o_key] ); |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | $args['temp_value'] = $value; |
414 | - $value[ $other_key ] = reset( $other_vals ); |
|
415 | - if ( FrmAppHelper::is_empty_value( $value[ $other_key ] ) ) { |
|
416 | - unset( $value[ $other_key ] ); |
|
414 | + $value[$other_key] = reset( $other_vals ); |
|
415 | + if ( FrmAppHelper::is_empty_value( $value[$other_key] ) ) { |
|
416 | + unset( $value[$other_key] ); |
|
417 | 417 | } |
418 | 418 | } |
419 | - } elseif ( $field->options[ $other_key ] == $value ) { |
|
419 | + } elseif ( $field->options[$other_key] == $value ) { |
|
420 | 420 | $value = $other_vals; |
421 | 421 | } |
422 | 422 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | if ( $term && is_array( $term ) ) { |
118 | 118 | $imported['imported']['terms'] ++; |
119 | - $imported['terms'][ (int) $t->term_id ] = $term['term_id']; |
|
119 | + $imported['terms'][(int) $t->term_id] = $term['term_id']; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | unset( $term, $t ); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | // Keep track of whether this specific form was updated or not. |
175 | - $imported['form_status'][ $form_id ] = 'imported'; |
|
175 | + $imported['form_status'][$form_id] = 'imported'; |
|
176 | 176 | self::track_imported_child_forms( (int) $form_id, $form['parent_form_id'], $child_forms ); |
177 | 177 | } |
178 | 178 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | // Update field ids/keys to new ones. |
185 | 185 | do_action( 'frm_after_duplicate_form', $form_id, $form, array( 'old_id' => $old_id ) ); |
186 | 186 | |
187 | - $imported['forms'][ (int) $item->id ] = $form_id; |
|
187 | + $imported['forms'][(int) $item->id] = $form_id; |
|
188 | 188 | |
189 | 189 | // Send pre 2.0 form options through function that creates actions. |
190 | 190 | self::migrate_form_settings_to_actions( $form['options'], $form_id, $imported, true ); |
@@ -243,15 +243,15 @@ discard block |
||
243 | 243 | } |
244 | 244 | |
245 | 245 | // Keep track of whether this specific form was updated or not |
246 | - $imported['form_status'][ $form_id ] = 'updated'; |
|
246 | + $imported['form_status'][$form_id] = 'updated'; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | private static function get_form_fields( $form_id ) { |
250 | 250 | $form_fields = FrmField::get_all_for_form( $form_id, '', 'exclude', 'exclude' ); |
251 | 251 | $old_fields = array(); |
252 | 252 | foreach ( $form_fields as $f ) { |
253 | - $old_fields[ $f->id ] = $f; |
|
254 | - $old_fields[ $f->field_key ] = $f->id; |
|
253 | + $old_fields[$f->id] = $f; |
|
254 | + $old_fields[$f->field_key] = $f->id; |
|
255 | 255 | unset( $f ); |
256 | 256 | } |
257 | 257 | $form_fields = $old_fields; |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | private static function track_imported_child_forms( $form_id, $parent_form_id, &$child_forms ) { |
310 | 310 | if ( $parent_form_id ) { |
311 | - $child_forms[ $form_id ] = $parent_form_id; |
|
311 | + $child_forms[$form_id] = $parent_form_id; |
|
312 | 312 | } |
313 | 313 | } |
314 | 314 | |
@@ -324,9 +324,9 @@ discard block |
||
324 | 324 | private static function maybe_update_child_form_parent_id( $imported_forms, $child_forms ) { |
325 | 325 | foreach ( $child_forms as $child_form_id => $old_parent_form_id ) { |
326 | 326 | |
327 | - if ( isset( $imported_forms[ $old_parent_form_id ] ) && $imported_forms[ $old_parent_form_id ] != $old_parent_form_id ) { |
|
327 | + if ( isset( $imported_forms[$old_parent_form_id] ) && $imported_forms[$old_parent_form_id] != $old_parent_form_id ) { |
|
328 | 328 | // Update all children with this old parent_form_id |
329 | - $new_parent_form_id = (int) $imported_forms[ $old_parent_form_id ]; |
|
329 | + $new_parent_form_id = (int) $imported_forms[$old_parent_form_id]; |
|
330 | 330 | |
331 | 331 | FrmForm::update( $child_form_id, array( 'parent_form_id' => $new_parent_form_id ) ); |
332 | 332 | } |
@@ -373,25 +373,25 @@ discard block |
||
373 | 373 | |
374 | 374 | if ( ! empty( $this_form ) ) { |
375 | 375 | // check for field to edit by field id |
376 | - if ( isset( $form_fields[ $f['id'] ] ) ) { |
|
376 | + if ( isset( $form_fields[$f['id']] ) ) { |
|
377 | 377 | FrmField::update( $f['id'], $f ); |
378 | 378 | $imported['updated']['fields'] ++; |
379 | 379 | |
380 | - unset( $form_fields[ $f['id'] ] ); |
|
380 | + unset( $form_fields[$f['id']] ); |
|
381 | 381 | |
382 | 382 | //unset old field key |
383 | - if ( isset( $form_fields[ $f['field_key'] ] ) ) { |
|
384 | - unset( $form_fields[ $f['field_key'] ] ); |
|
383 | + if ( isset( $form_fields[$f['field_key']] ) ) { |
|
384 | + unset( $form_fields[$f['field_key']] ); |
|
385 | 385 | } |
386 | - } elseif ( isset( $form_fields[ $f['field_key'] ] ) ) { |
|
386 | + } elseif ( isset( $form_fields[$f['field_key']] ) ) { |
|
387 | 387 | // check for field to edit by field key |
388 | 388 | unset( $f['id'] ); |
389 | 389 | |
390 | - FrmField::update( $form_fields[ $f['field_key'] ], $f ); |
|
390 | + FrmField::update( $form_fields[$f['field_key']], $f ); |
|
391 | 391 | $imported['updated']['fields'] ++; |
392 | 392 | |
393 | - unset( $form_fields[ $form_fields[ $f['field_key'] ] ] ); //unset old field id |
|
394 | - unset( $form_fields[ $f['field_key'] ] ); //unset old field key |
|
393 | + unset( $form_fields[$form_fields[$f['field_key']]] ); //unset old field id |
|
394 | + unset( $form_fields[$f['field_key']] ); //unset old field key |
|
395 | 395 | } else { |
396 | 396 | // if no matching field id or key in this form, create the field |
397 | 397 | self::create_imported_field( $f, $imported ); |
@@ -460,8 +460,8 @@ discard block |
||
460 | 460 | if ( $f['type'] == 'form' || ( $f['type'] == 'divider' && FrmField::is_option_true( $f['field_options'], 'repeat' ) ) ) { |
461 | 461 | if ( FrmField::is_option_true( $f['field_options'], 'form_select' ) ) { |
462 | 462 | $form_select = (int) $f['field_options']['form_select']; |
463 | - if ( isset( $imported['forms'][ $form_select ] ) ) { |
|
464 | - $f['field_options']['form_select'] = $imported['forms'][ $form_select ]; |
|
463 | + if ( isset( $imported['forms'][$form_select] ) ) { |
|
464 | + $f['field_options']['form_select'] = $imported['forms'][$form_select]; |
|
465 | 465 | } |
466 | 466 | } |
467 | 467 | } |
@@ -482,8 +482,8 @@ discard block |
||
482 | 482 | |
483 | 483 | if ( FrmField::is_option_true_in_array( $f['field_options'], 'get_values_form' ) ) { |
484 | 484 | $old_form = $f['field_options']['get_values_form']; |
485 | - if ( isset( $imported['forms'][ $old_form ] ) ) { |
|
486 | - $f['field_options']['get_values_form'] = $imported['forms'][ $old_form ]; |
|
485 | + if ( isset( $imported['forms'][$old_form] ) ) { |
|
486 | + $f['field_options']['get_values_form'] = $imported['forms'][$old_form]; |
|
487 | 487 | } |
488 | 488 | } |
489 | 489 | } |
@@ -504,12 +504,12 @@ discard block |
||
504 | 504 | private static function migrate_placeholders( &$f ) { |
505 | 505 | $update_values = self::migrate_field_placeholder( $f, 'clear_on_focus' ); |
506 | 506 | foreach ( $update_values as $k => $v ) { |
507 | - $f[ $k ] = $v; |
|
507 | + $f[$k] = $v; |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | $update_values = self::migrate_field_placeholder( $f, 'default_blank' ); |
511 | 511 | foreach ( $update_values as $k => $v ) { |
512 | - $f[ $k ] = $v; |
|
512 | + $f[$k] = $v; |
|
513 | 513 | } |
514 | 514 | } |
515 | 515 | |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | public static function migrate_field_placeholder( $field, $type ) { |
524 | 524 | $field = (array) $field; |
525 | 525 | $field_options = $field['field_options']; |
526 | - if ( empty( $field_options[ $type ] ) || empty( $field['default_value'] ) ) { |
|
526 | + if ( empty( $field_options[$type] ) || empty( $field['default_value'] ) ) { |
|
527 | 527 | return array(); |
528 | 528 | } |
529 | 529 | |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | if ( $opt == $default_value ) { |
552 | - unset( $options[ $opt_key ] ); |
|
552 | + unset( $options[$opt_key] ); |
|
553 | 553 | break; |
554 | 554 | } |
555 | 555 | } |
@@ -704,17 +704,17 @@ discard block |
||
704 | 704 | self::update_postmeta( $post, $post_id ); |
705 | 705 | |
706 | 706 | $this_type = 'posts'; |
707 | - if ( isset( $post_types[ $post['post_type'] ] ) ) { |
|
708 | - $this_type = $post_types[ $post['post_type'] ]; |
|
707 | + if ( isset( $post_types[$post['post_type']] ) ) { |
|
708 | + $this_type = $post_types[$post['post_type']]; |
|
709 | 709 | } |
710 | 710 | |
711 | 711 | if ( isset( $post['ID'] ) && $post_id == $post['ID'] ) { |
712 | - $imported['updated'][ $this_type ] ++; |
|
712 | + $imported['updated'][$this_type] ++; |
|
713 | 713 | } else { |
714 | - $imported['imported'][ $this_type ] ++; |
|
714 | + $imported['imported'][$this_type] ++; |
|
715 | 715 | } |
716 | 716 | |
717 | - $imported['posts'][ (int) $old_id ] = $post_id; |
|
717 | + $imported['posts'][(int) $old_id] = $post_id; |
|
718 | 718 | |
719 | 719 | do_action( 'frm_after_import_view', $post_id, $post ); |
720 | 720 | |
@@ -731,9 +731,9 @@ discard block |
||
731 | 731 | $post['attachment_url'] = (string) $item->attachment_url; |
732 | 732 | } |
733 | 733 | |
734 | - if ( $post['post_type'] == FrmFormActionsController::$action_post_type && isset( $imported['forms'][ (int) $post['menu_order'] ] ) ) { |
|
734 | + if ( $post['post_type'] == FrmFormActionsController::$action_post_type && isset( $imported['forms'][(int) $post['menu_order']] ) ) { |
|
735 | 735 | // update to new form id |
736 | - $post['menu_order'] = $imported['forms'][ (int) $post['menu_order'] ]; |
|
736 | + $post['menu_order'] = $imported['forms'][(int) $post['menu_order']]; |
|
737 | 737 | } |
738 | 738 | |
739 | 739 | // Don't allow default styles to take over a site's default style |
@@ -760,8 +760,8 @@ discard block |
||
760 | 760 | ); |
761 | 761 | |
762 | 762 | //switch old form and field ids to new ones |
763 | - if ( $m['key'] == 'frm_form_id' && isset( $imported['forms'][ (int) $m['value'] ] ) ) { |
|
764 | - $m['value'] = $imported['forms'][ (int) $m['value'] ]; |
|
763 | + if ( $m['key'] == 'frm_form_id' && isset( $imported['forms'][(int) $m['value']] ) ) { |
|
764 | + $m['value'] = $imported['forms'][(int) $m['value']]; |
|
765 | 765 | } else { |
766 | 766 | $m['value'] = FrmAppHelper::maybe_json_decode( $m['value'] ); |
767 | 767 | |
@@ -772,15 +772,15 @@ discard block |
||
772 | 772 | } elseif ( $m['key'] == 'frm_options' ) { |
773 | 773 | |
774 | 774 | foreach ( array( 'date_field_id', 'edate_field_id' ) as $setting_name ) { |
775 | - if ( isset( $m['value'][ $setting_name ] ) && is_numeric( $m['value'][ $setting_name ] ) && isset( $frm_duplicate_ids[ $m['value'][ $setting_name ] ] ) ) { |
|
776 | - $m['value'][ $setting_name ] = $frm_duplicate_ids[ $m['value'][ $setting_name ] ]; |
|
775 | + if ( isset( $m['value'][$setting_name] ) && is_numeric( $m['value'][$setting_name] ) && isset( $frm_duplicate_ids[$m['value'][$setting_name]] ) ) { |
|
776 | + $m['value'][$setting_name] = $frm_duplicate_ids[$m['value'][$setting_name]]; |
|
777 | 777 | } |
778 | 778 | } |
779 | 779 | |
780 | 780 | $check_dup_array = array(); |
781 | 781 | if ( isset( $m['value']['order_by'] ) && ! empty( $m['value']['order_by'] ) ) { |
782 | - if ( is_numeric( $m['value']['order_by'] ) && isset( $frm_duplicate_ids[ $m['value']['order_by'] ] ) ) { |
|
783 | - $m['value']['order_by'] = $frm_duplicate_ids[ $m['value']['order_by'] ]; |
|
782 | + if ( is_numeric( $m['value']['order_by'] ) && isset( $frm_duplicate_ids[$m['value']['order_by']] ) ) { |
|
783 | + $m['value']['order_by'] = $frm_duplicate_ids[$m['value']['order_by']]; |
|
784 | 784 | } elseif ( is_array( $m['value']['order_by'] ) ) { |
785 | 785 | $check_dup_array[] = 'order_by'; |
786 | 786 | } |
@@ -791,9 +791,9 @@ discard block |
||
791 | 791 | } |
792 | 792 | |
793 | 793 | foreach ( $check_dup_array as $check_k ) { |
794 | - foreach ( (array) $m['value'][ $check_k ] as $mk => $mv ) { |
|
795 | - if ( isset( $frm_duplicate_ids[ $mv ] ) ) { |
|
796 | - $m['value'][ $check_k ][ $mk ] = $frm_duplicate_ids[ $mv ]; |
|
794 | + foreach ( (array) $m['value'][$check_k] as $mk => $mv ) { |
|
795 | + if ( isset( $frm_duplicate_ids[$mv] ) ) { |
|
796 | + $m['value'][$check_k][$mk] = $frm_duplicate_ids[$mv]; |
|
797 | 797 | } |
798 | 798 | unset( $mk, $mv ); |
799 | 799 | } |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | $m['value'] = FrmAppHelper::maybe_json_decode( $m['value'] ); |
807 | 807 | } |
808 | 808 | |
809 | - $post['postmeta'][ (string) $meta->meta_key ] = $m['value']; |
|
809 | + $post['postmeta'][(string) $meta->meta_key] = $m['value']; |
|
810 | 810 | } |
811 | 811 | |
812 | 812 | /** |
@@ -834,11 +834,11 @@ discard block |
||
834 | 834 | $name = (string) $c; |
835 | 835 | } |
836 | 836 | |
837 | - if ( ! isset( $post['tax_input'][ $taxonomy ] ) ) { |
|
838 | - $post['tax_input'][ $taxonomy ] = array(); |
|
837 | + if ( ! isset( $post['tax_input'][$taxonomy] ) ) { |
|
838 | + $post['tax_input'][$taxonomy] = array(); |
|
839 | 839 | } |
840 | 840 | |
841 | - $post['tax_input'][ $taxonomy ][] = $name; |
|
841 | + $post['tax_input'][$taxonomy][] = $name; |
|
842 | 842 | unset( $name ); |
843 | 843 | } |
844 | 844 | } |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | |
938 | 938 | $message = '<ul>'; |
939 | 939 | foreach ( $result as $type => $results ) { |
940 | - if ( ! isset( $t_strings[ $type ] ) ) { |
|
940 | + if ( ! isset( $t_strings[$type] ) ) { |
|
941 | 941 | // only print imported and updated |
942 | 942 | continue; |
943 | 943 | } |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | } |
950 | 950 | |
951 | 951 | if ( ! empty( $s_message ) ) { |
952 | - $message .= '<li><strong>' . $t_strings[ $type ] . ':</strong> '; |
|
952 | + $message .= '<li><strong>' . $t_strings[$type] . ':</strong> '; |
|
953 | 953 | $message .= implode( ', ', $s_message ); |
954 | 954 | $message .= '</li>'; |
955 | 955 | } |
@@ -989,7 +989,7 @@ discard block |
||
989 | 989 | 'actions' => sprintf( _n( '%1$s Form Action', '%1$s Form Actions', $m, 'formidable' ), $m ), |
990 | 990 | ); |
991 | 991 | |
992 | - $s_message[] = isset( $strings[ $type ] ) ? $strings[ $type ] : ' ' . $m . ' ' . ucfirst( $type ); |
|
992 | + $s_message[] = isset( $strings[$type] ) ? $strings[$type] : ' ' . $m . ' ' . ucfirst( $type ); |
|
993 | 993 | } |
994 | 994 | |
995 | 995 | /** |
@@ -1120,10 +1120,10 @@ discard block |
||
1120 | 1120 | $array_defaults = array_filter( $defaults, 'is_array' ); |
1121 | 1121 | foreach ( $array_defaults as $d => $default ) { |
1122 | 1122 | // compare array defaults |
1123 | - if ( $default == $saved[ $d ] ) { |
|
1124 | - unset( $saved[ $d ] ); |
|
1123 | + if ( $default == $saved[$d] ) { |
|
1124 | + unset( $saved[$d] ); |
|
1125 | 1125 | } |
1126 | - unset( $defaults[ $d ] ); |
|
1126 | + unset( $defaults[$d] ); |
|
1127 | 1127 | } |
1128 | 1128 | $saved = array_diff_assoc( (array) $saved, $defaults ); |
1129 | 1129 | } |
@@ -1134,14 +1134,14 @@ discard block |
||
1134 | 1134 | * @since 3.06 |
1135 | 1135 | */ |
1136 | 1136 | private static function remove_default_html( $html_name, $defaults, &$options ) { |
1137 | - if ( ! isset( $options[ $html_name ] ) || ! isset( $defaults[ $html_name ] ) ) { |
|
1137 | + if ( ! isset( $options[$html_name] ) || ! isset( $defaults[$html_name] ) ) { |
|
1138 | 1138 | return; |
1139 | 1139 | } |
1140 | 1140 | |
1141 | - $old_html = str_replace( "\r\n", "\n", $options[ $html_name ] ); |
|
1142 | - $default_html = $defaults[ $html_name ]; |
|
1141 | + $old_html = str_replace( "\r\n", "\n", $options[$html_name] ); |
|
1142 | + $default_html = $defaults[$html_name]; |
|
1143 | 1143 | if ( $old_html == $default_html ) { |
1144 | - unset( $options[ $html_name ] ); |
|
1144 | + unset( $options[$html_name] ); |
|
1145 | 1145 | |
1146 | 1146 | return; |
1147 | 1147 | } |
@@ -1149,7 +1149,7 @@ discard block |
||
1149 | 1149 | // Account for some of the older field default HTML. |
1150 | 1150 | $default_html = str_replace( ' id="frm_desc_field_[key]"', '', $default_html ); |
1151 | 1151 | if ( $old_html == $default_html ) { |
1152 | - unset( $options[ $html_name ] ); |
|
1152 | + unset( $options[$html_name] ); |
|
1153 | 1153 | } |
1154 | 1154 | } |
1155 | 1155 | |
@@ -1235,8 +1235,8 @@ discard block |
||
1235 | 1235 | ); |
1236 | 1236 | |
1237 | 1237 | foreach ( $post_settings as $post_setting ) { |
1238 | - if ( isset( $form_options[ $post_setting ] ) ) { |
|
1239 | - $new_action['post_content'][ $post_setting ] = $form_options[ $post_setting ]; |
|
1238 | + if ( isset( $form_options[$post_setting] ) ) { |
|
1239 | + $new_action['post_content'][$post_setting] = $form_options[$post_setting]; |
|
1240 | 1240 | } |
1241 | 1241 | unset( $post_setting ); |
1242 | 1242 | } |
@@ -1306,11 +1306,11 @@ discard block |
||
1306 | 1306 | foreach ( $post_content as $key => $setting ) { |
1307 | 1307 | if ( ! is_array( $setting ) && in_array( $key, $basic_fields ) ) { |
1308 | 1308 | // Replace old IDs with new IDs |
1309 | - $post_content[ $key ] = str_replace( $old, $new, $setting ); |
|
1309 | + $post_content[$key] = str_replace( $old, $new, $setting ); |
|
1310 | 1310 | } elseif ( is_array( $setting ) && in_array( $key, $array_fields ) ) { |
1311 | 1311 | foreach ( $setting as $k => $val ) { |
1312 | 1312 | // Replace old IDs with new IDs |
1313 | - $post_content[ $key ][ $k ] = str_replace( $old, $new, $val ); |
|
1313 | + $post_content[$key][$k] = str_replace( $old, $new, $val ); |
|
1314 | 1314 | } |
1315 | 1315 | } |
1316 | 1316 | unset( $key, $setting ); |
@@ -1386,8 +1386,8 @@ discard block |
||
1386 | 1386 | private static function remove_deprecated_notification_settings( $form_id, $form_options ) { |
1387 | 1387 | $delete_settings = array( 'notification', 'autoresponder', 'email_to' ); |
1388 | 1388 | foreach ( $delete_settings as $index ) { |
1389 | - if ( isset( $form_options[ $index ] ) ) { |
|
1390 | - unset( $form_options[ $index ] ); |
|
1389 | + if ( isset( $form_options[$index] ) ) { |
|
1390 | + unset( $form_options[$index] ); |
|
1391 | 1391 | } |
1392 | 1392 | } |
1393 | 1393 | FrmForm::update( $form_id, array( 'options' => $form_options ) ); |
@@ -1440,12 +1440,12 @@ discard block |
||
1440 | 1440 | 'reply_to_name' => '', |
1441 | 1441 | ); |
1442 | 1442 | foreach ( $reply_fields as $f => $val ) { |
1443 | - if ( isset( $notification[ $f ] ) ) { |
|
1444 | - $atts[ $f ] = $notification[ $f ]; |
|
1445 | - if ( 'custom' == $notification[ $f ] ) { |
|
1446 | - $atts[ $f ] = $notification[ 'cust_' . $f ]; |
|
1447 | - } elseif ( is_numeric( $atts[ $f ] ) && ! empty( $atts[ $f ] ) ) { |
|
1448 | - $atts[ $f ] = '[' . $atts[ $f ] . ']'; |
|
1443 | + if ( isset( $notification[$f] ) ) { |
|
1444 | + $atts[$f] = $notification[$f]; |
|
1445 | + if ( 'custom' == $notification[$f] ) { |
|
1446 | + $atts[$f] = $notification['cust_' . $f]; |
|
1447 | + } elseif ( is_numeric( $atts[$f] ) && ! empty( $atts[$f] ) ) { |
|
1448 | + $atts[$f] = '[' . $atts[$f] . ']'; |
|
1449 | 1449 | } |
1450 | 1450 | } |
1451 | 1451 | unset( $f, $val ); |
@@ -1476,13 +1476,13 @@ discard block |
||
1476 | 1476 | foreach ( $atts['email_to'] as $key => $email_field ) { |
1477 | 1477 | |
1478 | 1478 | if ( is_numeric( $email_field ) ) { |
1479 | - $atts['email_to'][ $key ] = '[' . $email_field . ']'; |
|
1479 | + $atts['email_to'][$key] = '[' . $email_field . ']'; |
|
1480 | 1480 | } |
1481 | 1481 | |
1482 | 1482 | if ( strpos( $email_field, '|' ) ) { |
1483 | 1483 | $email_opt = explode( '|', $email_field ); |
1484 | 1484 | if ( isset( $email_opt[0] ) ) { |
1485 | - $atts['email_to'][ $key ] = '[' . $email_opt[0] . ' show=' . $email_opt[1] . ']'; |
|
1485 | + $atts['email_to'][$key] = '[' . $email_opt[0] . ' show=' . $email_opt[1] . ']'; |
|
1486 | 1486 | } |
1487 | 1487 | unset( $email_opt ); |
1488 | 1488 | } |
@@ -1503,12 +1503,12 @@ discard block |
||
1503 | 1503 | // Add more fields to the new notification |
1504 | 1504 | $add_fields = array( 'email_message', 'email_subject', 'plain_text', 'inc_user_info', 'conditions' ); |
1505 | 1505 | foreach ( $add_fields as $add_field ) { |
1506 | - if ( isset( $notification[ $add_field ] ) ) { |
|
1507 | - $new_notification['post_content'][ $add_field ] = $notification[ $add_field ]; |
|
1506 | + if ( isset( $notification[$add_field] ) ) { |
|
1507 | + $new_notification['post_content'][$add_field] = $notification[$add_field]; |
|
1508 | 1508 | } elseif ( in_array( $add_field, array( 'plain_text', 'inc_user_info' ) ) ) { |
1509 | - $new_notification['post_content'][ $add_field ] = 0; |
|
1509 | + $new_notification['post_content'][$add_field] = 0; |
|
1510 | 1510 | } else { |
1511 | - $new_notification['post_content'][ $add_field ] = ''; |
|
1511 | + $new_notification['post_content'][$add_field] = ''; |
|
1512 | 1512 | } |
1513 | 1513 | unset( $add_field ); |
1514 | 1514 | } |
@@ -1532,7 +1532,7 @@ discard block |
||
1532 | 1532 | if ( isset( $post_content['conditions'] ) && is_array( $post_content['conditions'] ) ) { |
1533 | 1533 | foreach ( $post_content['conditions'] as $email_key => $val ) { |
1534 | 1534 | if ( is_numeric( $email_key ) ) { |
1535 | - $post_content['conditions'][ $email_key ] = self::switch_action_field_ids( $val, array( 'hide_field' ) ); |
|
1535 | + $post_content['conditions'][$email_key] = self::switch_action_field_ids( $val, array( 'hide_field' ) ); |
|
1536 | 1536 | } |
1537 | 1537 | unset( $email_key, $val ); |
1538 | 1538 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $section['function'] = $original; |
116 | 116 | } |
117 | 117 | |
118 | - $sections[ $key ] = $section; |
|
118 | + $sections[$key] = $section; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | return $sections; |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | |
128 | 128 | $section = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' ); |
129 | 129 | $sections = self::get_settings_tabs(); |
130 | - if ( ! isset( $sections[ $section ] ) ) { |
|
130 | + if ( ! isset( $sections[$section] ) ) { |
|
131 | 131 | wp_die(); |
132 | 132 | } |
133 | 133 | |
134 | - $section = $sections[ $section ]; |
|
134 | + $section = $sections[$section]; |
|
135 | 135 | |
136 | 136 | if ( isset( $section['class'] ) ) { |
137 | 137 | call_user_func( array( $section['class'], $section['function'] ) ); |
@@ -65,19 +65,19 @@ discard block |
||
65 | 65 | global $frm_vars; |
66 | 66 | $form_id = FrmForm::get_current_form_id(); |
67 | 67 | |
68 | - $columns[ $form_id . '_id' ] = 'ID'; |
|
69 | - $columns[ $form_id . '_item_key' ] = esc_html__( 'Entry Key', 'formidable' ); |
|
68 | + $columns[$form_id . '_id'] = 'ID'; |
|
69 | + $columns[$form_id . '_item_key'] = esc_html__( 'Entry Key', 'formidable' ); |
|
70 | 70 | |
71 | 71 | if ( $form_id ) { |
72 | 72 | self::get_columns_for_form( $form_id, $columns ); |
73 | 73 | } else { |
74 | - $columns[ $form_id . '_form_id' ] = __( 'Form', 'formidable' ); |
|
75 | - $columns[ $form_id . '_name' ] = __( 'Entry Name', 'formidable' ); |
|
76 | - $columns[ $form_id . '_user_id' ] = __( 'Created By', 'formidable' ); |
|
74 | + $columns[$form_id . '_form_id'] = __( 'Form', 'formidable' ); |
|
75 | + $columns[$form_id . '_name'] = __( 'Entry Name', 'formidable' ); |
|
76 | + $columns[$form_id . '_user_id'] = __( 'Created By', 'formidable' ); |
|
77 | 77 | } |
78 | 78 | |
79 | - $columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' ); |
|
80 | - $columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' ); |
|
79 | + $columns[$form_id . '_created_at'] = __( 'Entry creation date', 'formidable' ); |
|
80 | + $columns[$form_id . '_updated_at'] = __( 'Entry update date', 'formidable' ); |
|
81 | 81 | self::maybe_add_ip_col( $form_id, $columns ); |
82 | 82 | |
83 | 83 | $frm_vars['cols'] = $columns; |
@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | |
126 | 126 | foreach ( $sub_form_cols as $k => $sub_form_col ) { |
127 | 127 | if ( FrmField::is_no_save_field( $sub_form_col->type ) ) { |
128 | - unset( $sub_form_cols[ $k ] ); |
|
128 | + unset( $sub_form_cols[$k] ); |
|
129 | 129 | continue; |
130 | 130 | } |
131 | - $columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 ); |
|
131 | + $columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id] = FrmAppHelper::truncate( $sub_form_col->name, 35 ); |
|
132 | 132 | unset( $sub_form_col ); |
133 | 133 | } |
134 | 134 | } |
@@ -145,15 +145,15 @@ discard block |
||
145 | 145 | $has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' ); |
146 | 146 | $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status'; |
147 | 147 | if ( $has_separate_value && ! $is_post_status ) { |
148 | - $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 ); |
|
148 | + $columns[$form_id . '_frmsep_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 ); |
|
149 | 149 | } |
150 | 150 | |
151 | - $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 ); |
|
151 | + $columns[$form_id . '_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 ); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | private static function maybe_add_ip_col( $form_id, &$columns ) { |
155 | 155 | if ( FrmAppHelper::ips_saved() ) { |
156 | - $columns[ $form_id . '_ip' ] = 'IP'; |
|
156 | + $columns[$form_id . '_ip'] = 'IP'; |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | foreach ( $meta_value as $mk => $mv ) { |
192 | 192 | // Remove blank values. |
193 | 193 | if ( empty( $mv ) ) { |
194 | - unset( $meta_value[ $mk ] ); |
|
194 | + unset( $meta_value[$mk] ); |
|
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | foreach ( $fields as $field ) { |
269 | 269 | if ( $field->type != 'checkbox' && ( ! isset( $field->field_options['post_field'] ) || $field->field_options['post_field'] == '' ) ) { |
270 | 270 | // Can't sort on checkboxes because they are stored serialized, or post fields |
271 | - $columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id; |
|
271 | + $columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id; |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | $atts['form_id'] . '_item_key' => '', |
333 | 333 | $atts['form_id'] . '_id' => '', |
334 | 334 | ); |
335 | - $cols = $remove_first + array_reverse( $frm_vars['cols'], true ); |
|
335 | + $cols = $remove_first + array_reverse( $frm_vars['cols'], true ); |
|
336 | 336 | |
337 | 337 | $i = $atts['i']; |
338 | 338 | |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | |
344 | 344 | if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) { |
345 | 345 | $result[] = $col_key; |
346 | - $i--; |
|
346 | + $i --; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | unset( $col_key, $col ); |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $entry_query = $wpdb->prepare( "DELETE FROM {$wpdb->prefix}frm_items WHERE form_id=%d", $form_id ); |
498 | 498 | |
499 | 499 | if ( ! empty( $form_ids ) ) { |
500 | - $form_query = ' OR form_id in (' . $form_ids . ')'; |
|
500 | + $form_query = ' OR form_id in (' . $form_ids . ')'; |
|
501 | 501 | $meta_query .= $form_query; |
502 | 502 | $entry_query .= $form_query; |
503 | 503 | } |
@@ -545,9 +545,9 @@ discard block |
||
545 | 545 | if ( ! isset( $frm_vars['form_params'] ) ) { |
546 | 546 | $frm_vars['form_params'] = array(); |
547 | 547 | } |
548 | - $frm_vars['form_params'][ $form->id ] = $params; |
|
548 | + $frm_vars['form_params'][$form->id] = $params; |
|
549 | 549 | |
550 | - if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) { |
|
550 | + if ( isset( $frm_vars['created_entries'][$form_id] ) ) { |
|
551 | 551 | return; |
552 | 552 | } |
553 | 553 | |
@@ -563,16 +563,16 @@ discard block |
||
563 | 563 | */ |
564 | 564 | $errors = apply_filters( 'frm_entries_before_create', $errors, $form ); |
565 | 565 | |
566 | - $frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors ); |
|
566 | + $frm_vars['created_entries'][$form_id] = array( 'errors' => $errors ); |
|
567 | 567 | |
568 | 568 | if ( empty( $errors ) ) { |
569 | 569 | $_POST['frm_skip_cookie'] = 1; |
570 | 570 | $do_success = false; |
571 | 571 | if ( $params['action'] == 'create' ) { |
572 | - if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) { |
|
573 | - $frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); |
|
572 | + if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) { |
|
573 | + $frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST ); |
|
574 | 574 | |
575 | - $params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id']; |
|
575 | + $params['id'] = $frm_vars['created_entries'][$form_id]['entry_id']; |
|
576 | 576 | $do_success = true; |
577 | 577 | } |
578 | 578 | } |
@@ -98,19 +98,19 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | foreach ( $action_controls as $action ) { |
101 | - if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped ) ) { |
|
101 | + if ( isset( $groups[$action->id_base] ) || in_array( $action->id_base, $grouped ) ) { |
|
102 | 102 | continue; |
103 | 103 | } |
104 | 104 | |
105 | 105 | $this_group = $action->action_options['group']; |
106 | - if ( ! isset( $groups[ $this_group ] ) ) { |
|
106 | + if ( ! isset( $groups[$this_group] ) ) { |
|
107 | 107 | $this_group = 'misc'; |
108 | 108 | } |
109 | 109 | |
110 | - if ( ! isset( $groups[ $this_group ]['actions'] ) ) { |
|
111 | - $groups[ $this_group ]['actions'] = array(); |
|
110 | + if ( ! isset( $groups[$this_group]['actions'] ) ) { |
|
111 | + $groups[$this_group]['actions'] = array(); |
|
112 | 112 | } |
113 | - $groups[ $this_group ]['actions'][] = $action->id_base; |
|
113 | + $groups[$this_group]['actions'][] = $action->id_base; |
|
114 | 114 | |
115 | 115 | unset( $action ); |
116 | 116 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | return $a; |
242 | 242 | } |
243 | 243 | |
244 | - $actions[ $a->id_base ] = $a; |
|
244 | + $actions[$a->id_base] = $a; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | return $actions; |
@@ -272,16 +272,16 @@ discard block |
||
272 | 272 | $action_map = array(); |
273 | 273 | |
274 | 274 | foreach ( $action_controls as $key => $control ) { |
275 | - $action_map[ $control->id_base ] = $key; |
|
275 | + $action_map[$control->id_base] = $key; |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | foreach ( $form_actions as $action ) { |
279 | - if ( ! isset( $action_map[ $action->post_excerpt ] ) ) { |
|
279 | + if ( ! isset( $action_map[$action->post_excerpt] ) ) { |
|
280 | 280 | // don't try and show settings if action no longer exists |
281 | 281 | continue; |
282 | 282 | } |
283 | 283 | |
284 | - self::action_control( $action, $form, $action->ID, $action_controls[ $action_map[ $action->post_excerpt ] ], $values ); |
|
284 | + self::action_control( $action, $form, $action->ID, $action_controls[$action_map[$action->post_excerpt]], $values ); |
|
285 | 285 | } |
286 | 286 | } |
287 | 287 | |
@@ -489,8 +489,8 @@ discard block |
||
489 | 489 | } |
490 | 490 | |
491 | 491 | // Store actions so they can be triggered with the correct priority. |
492 | - $stored_actions[ $action->ID ] = $action; |
|
493 | - $action_priority[ $action->ID ] = $link_settings[ $action->post_excerpt ]->action_options['priority']; |
|
492 | + $stored_actions[$action->ID] = $action; |
|
493 | + $action_priority[$action->ID] = $link_settings[$action->post_excerpt]->action_options['priority']; |
|
494 | 494 | |
495 | 495 | unset( $action ); |
496 | 496 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | new FrmNotification(); |
503 | 503 | |
504 | 504 | foreach ( $action_priority as $action_id => $priority ) { |
505 | - $action = $stored_actions[ $action_id ]; |
|
505 | + $action = $stored_actions[$action_id]; |
|
506 | 506 | do_action( 'frm_trigger_' . $action->post_excerpt . '_action', $action, $entry, $form, $event ); |
507 | 507 | do_action( 'frm_trigger_' . $action->post_excerpt . '_' . $event . '_action', $action, $entry, $form ); |
508 | 508 | |
@@ -549,12 +549,12 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | public function register( $action_class ) { |
552 | - $this->actions[ $action_class ] = new $action_class(); |
|
552 | + $this->actions[$action_class] = new $action_class(); |
|
553 | 553 | } |
554 | 554 | |
555 | 555 | public function unregister( $action_class ) { |
556 | - if ( isset( $this->actions[ $action_class ] ) ) { |
|
557 | - unset( $this->actions[ $action_class ] ); |
|
556 | + if ( isset( $this->actions[$action_class] ) ) { |
|
557 | + unset( $this->actions[$action_class] ); |
|
558 | 558 | } |
559 | 559 | } |
560 | 560 | |
@@ -563,8 +563,8 @@ discard block |
||
563 | 563 | |
564 | 564 | foreach ( $keys as $key ) { |
565 | 565 | // don't register new action if old action with the same id is already registered |
566 | - if ( ! isset( $this->actions[ $key ] ) ) { |
|
567 | - $this->actions[ $key ]->_register(); |
|
566 | + if ( ! isset( $this->actions[$key] ) ) { |
|
567 | + $this->actions[$key]->_register(); |
|
568 | 568 | } |
569 | 569 | } |
570 | 570 | } |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before{ |
88 | - content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ); ?>"; |
|
88 | + content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['-'] : $minus_icons[1]['-'] ); ?>"; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{ |
92 | - content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ); ?>"; |
|
92 | + content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ); ?>"; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before, |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | .<?php echo esc_html( $style_class ); ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{ |
102 | - content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ); ?>"; |
|
102 | + content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ); ?>"; |
|
103 | 103 | color:<?php echo esc_html( $section_color . $important ); ?>; |
104 | 104 | } |
105 | 105 | |
106 | 106 | .<?php echo esc_html( $style_class ); ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{ |
107 | - content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ); ?>"; |
|
107 | + content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['+'] : $arrow_icons[1]['+'] ); ?>"; |
|
108 | 108 | color:<?php echo esc_html( $section_color . $important ); ?>; |
109 | 109 | } |
110 | 110 |