PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7.2
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7.2
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmCSVExportHelper.php +15 -13 6.3.26.7.2 View file →
@@ -239,9 +239,10 @@
239 239 }
240 240
241 241 private static function field_headings( $col ) {
242 242 $field_type_obj = FrmFieldFactory::get_field_factory( $col );
243 - if ( ! empty( $field_type_obj->is_combo_field ) ) { // This is combo field.
243 + if ( ! empty( $field_type_obj->is_combo_field ) ) {
244 + // This is combo field.
244 245 return $field_type_obj->get_export_headings();
245 246 }
246 247
247 248 $field_headings = array();
@@ -268,10 +269,11 @@
268 269 $repeater_ids = array();
269 270
270 271 foreach ( self::$fields as $col ) {
271 272 if ( self::is_the_child_of_a_repeater( $col ) ) {
272 - $repeater_id = $col->field_options['in_section'];
273 - $headings[ 'repeater' . $repeater_id ] = array(); // set a placeholder to maintain order for repeater fields
273 + $repeater_id = $col->field_options['in_section'];
274 + // Set a placeholder to maintain order for repeater fields.
275 + $headings[ 'repeater' . $repeater_id ] = array();
274 276
275 277 if ( ! isset( $fields_by_repeater_id[ $repeater_id ] ) ) {
276 278 $fields_by_repeater_id[ $repeater_id ] = array();
277 279 $repeater_ids[] = $repeater_id;
@@ -327,9 +329,9 @@
327 329 unset( $key, $heading, $max, $repeater_headings, $repeater_id, $fields_by_repeater_id );
328 330
329 331 $headings = $flat;
330 332 unset( $flat );
331 - }
333 + }//end if
332 334
333 335 if ( self::$comment_count ) {
334 336 for ( $i = 0; $i < self::$comment_count; $i ++ ) {
335 337 $headings[ 'comment' . $i ] = __( 'Comment', 'formidable' );
@@ -342,9 +344,9 @@
342 344 $headings['created_at'] = __( 'Timestamp', 'formidable' );
343 345 $headings['updated_at'] = __( 'Last Updated', 'formidable' );
344 346 $headings['user_id'] = __( 'Created By', 'formidable' );
345 347 $headings['updated_by'] = __( 'Updated By', 'formidable' );
346 - $headings['is_draft'] = __( 'Draft', 'formidable' );
348 + $headings['is_draft'] = __( 'Entry Status', 'formidable' );
347 349 $headings['ip'] = __( 'IP', 'formidable' );
348 350 $headings['id'] = __( 'ID', 'formidable' );
349 351 $headings['item_key'] = __( 'Key', 'formidable' );
350 352 if ( self::has_parent_id() ) {
@@ -433,19 +435,19 @@
433 435 if ( ! isset( $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] ) ) {
434 436 $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] = array();
435 437 } elseif ( ! is_array( $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] ) ) {
436 438 // if the data is here, it should be an array but if this field has collected data
437 - // both while inside and outside of the repeating section, it's possible this is a string
439 + // both while inside and outside of the repeating section, it's possible this is a string.
438 440 $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] = (array) $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ];
439 441 }
440 442
441 - //add the repeated values
443 + // Add the repeated values.
442 444 $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ][] = $meta_value;
443 - }
445 + }//end foreach
444 446
445 447 self::$entry->metas = self::fill_missing_repeater_metas( self::$entry->metas, $entries );
446 448 $entries[ self::$entry->parent_item_id ]->metas += self::$entry->metas;
447 - }
449 + }//end if
448 450
449 451 // add the embedded form id
450 452 if ( ! isset( $entries[ self::$entry->parent_item_id ]->embedded_fields ) ) {
451 453 $entries[ self::$entry->parent_item_id ]->embedded_fields = array();
@@ -536,9 +538,9 @@
536 538
537 539 $row[ $col->id ] = $field_value;
538 540
539 541 unset( $col, $field_value );
540 - }
542 + }//end foreach
541 543 }
542 544
543 545 /**
544 546 * @since 5.0.06
@@ -592,9 +594,9 @@
592 594 $row['created_at'] = FrmAppHelper::get_formatted_time( self::$entry->created_at, self::$wp_date_format, ' ' );
593 595 $row['updated_at'] = FrmAppHelper::get_formatted_time( self::$entry->updated_at, self::$wp_date_format, ' ' );
594 596 $row['user_id'] = self::$entry->user_id;
595 597 $row['updated_by'] = self::$entry->updated_by;
596 - $row['is_draft'] = self::$entry->is_draft ? '1' : '0';
598 + $row['is_draft'] = self::$entry->is_draft;
597 599 $row['ip'] = self::$entry->ip;
598 600 $row['id'] = self::$entry->id;
599 601 $row['item_key'] = self::$entry->item_key;
600 602 if ( self::has_parent_id() ) {
@@ -642,9 +644,9 @@
642 644 }
643 645 $sep = self::$column_separator;
644 646
645 647 unset( $k, $row );
646 - }
648 + }//end foreach
647 649 if ( $echo ) {
648 650 echo "\n";
649 651 } else {
650 652 fwrite( self::$fp, "\n" );
@@ -661,9 +663,9 @@
661 663 switch ( self::$to_encoding ) {
662 664 case 'macintosh':
663 665 // this map was derived from the differences between the MacRoman and UTF-8 Charsets
664 666 // Reference:
665 - // - http://www.alanwood.net/demos/macroman.html
667 + // http://www.alanwood.net/demos/macroman.html.
666 668 $convmap = array( 256, 304, 0, 0xffff, 306, 337, 0, 0xffff, 340, 375, 0, 0xffff, 377, 401, 0, 0xffff, 403, 709, 0, 0xffff, 712, 727, 0, 0xffff, 734, 936, 0, 0xffff, 938, 959, 0, 0xffff, 961, 8210, 0, 0xffff, 8213, 8215, 0, 0xffff, 8219, 8219, 0, 0xffff, 8227, 8229, 0, 0xffff, 8231, 8239, 0, 0xffff, 8241, 8248, 0, 0xffff, 8251, 8259, 0, 0xffff, 8261, 8363, 0, 0xffff, 8365, 8481, 0, 0xffff, 8483, 8705, 0, 0xffff, 8707, 8709, 0, 0xffff, 8711, 8718, 0, 0xffff, 8720, 8720, 0, 0xffff, 8722, 8729, 0, 0xffff, 8731, 8733, 0, 0xffff, 8735, 8746, 0, 0xffff, 8748, 8775, 0, 0xffff, 8777, 8799, 0, 0xffff, 8801, 8803, 0, 0xffff, 8806, 9673, 0, 0xffff, 9675, 63742, 0, 0xffff, 63744, 64256, 0, 0xffff );
667 669 break;
668 670 case 'ISO-8859-1':
669 671 $convmap = array( 256, 10000, 0, 0xffff );