HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/plan4ev/public_html/wp-content/plugins/caldera-forms/classes/csv/util.php
<?php

/**
 * Utility functions for CSV related work
 *
 * @package Caldera_Forms
 * @author    Josh Pollock <Josh@CalderaWP.com>
 * @license   GPL-2.0+
 * @link
 * @copyright 2016 CalderaWP LLC
 */
class Caldera_Forms_CSV_Util {

	/**
	 * Get the character encoding for CSV files
	 *
	 * @since 1.4.4
	 *
	 * @param array $form Form config. Technically optional, but should always be passed for benefit of filter.
	 *
	 * @return string
	 */
	public static function character_encoding( array  $form = array() ){

		/**
		 * Change the character encoding for CSV
		 *
		 * Used for entry export and email attachments
		 *
		 * @since 1.4.4
		 *
		 * @param string $encoding. Default is 'utf-8'
		 * @param array $form Current form configuration. Might be empty
		 */
		return apply_filters( 'caldera_forms_csv_character_encoding', 'utf-8', $form );
	}

	/**
	 * Check if CSV export should show time in localized or UTC time.
	 *
	 * @since 1.5.6
	 *
	 * @param array $form
	 *
	 * @return bool
	 */
	public static function should_localize_time( array  $form = array() ){
		/**
		 * Change if localized or UTC timestamp should be used in CSV export
		 *
		 * @since 1.5.6
		 *
		 * @param bool $localize. Default is false. Change to true to use localized time, instead of UTC.
		 * @param array $form Current form configuration. Might be empty
		 */
		return apply_filters( 'caldera_forms_csv_localize_time', false, $form );
	}

	/**
	 * Get the file type for CSV -- tsv or csv
	 *
	 * @since 1.5.6
	 *
	 * @param array $form Form config. Technically optional, but should always be passed for benefit of filter.
	 *
	 * @return string
	 */
	public static function file_type( array  $form = array() ){

		/**
		 * Change the file type for CSV -- tsv or csv
		 *
		 * @since 1.5.6
		 *
		 * @param string $type. Default is 'csv'
		 * @param array $form Current form configuration. Might be empty
		 */
		return apply_filters( 'caldera_forms_csv_file_type', 'csv', $form );
	}
}