wpcf7_normalize_newline_deep()CF7 1.0

Navigates through an array, object, or scalar, and normalizes newline characters in the each value.

Хуков нет.

Возвращает

Разное. Processed value.

Использование

wpcf7_normalize_newline_deep( $input, $to );
$input(разное) (обязательный)
The array or string to be processed.
$to(строка)
The newline character that is used in the output.
По умолчанию: "\n"

Код wpcf7_normalize_newline_deep() CF7 5.9.3

function wpcf7_normalize_newline_deep( $input, $to = "\n" ) {
	if ( is_array( $input ) ) {
		$result = array();

		foreach ( $input as $key => $text ) {
			$result[$key] = wpcf7_normalize_newline_deep( $text, $to );
		}

		return $result;
	}

	return wpcf7_normalize_newline( $input, $to );
}