wpcf7_normalize_newline_deep()
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() wpcf7 normalize newline deep CF7 6.1.6
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 );
}