wpcf7_sanitize_messages()CF7 1.0

Sanitizes the messages property data.

Хуков нет.

Возвращает

null. Ничего (null).

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

wpcf7_sanitize_messages( $input, $defaults );
$input (обязательный)
-
$defaults **
-
По умолчанию: array()

Код wpcf7_sanitize_messages() CF7 5.9.3

function wpcf7_sanitize_messages( $input, $defaults = array() ) {
	$output = array();

	foreach ( wpcf7_messages() as $key => $val ) {
		if ( isset( $input[$key] ) ) {
			$output[$key] = trim( $input[$key] );
		} elseif ( isset( $defaults[$key] ) ) {
			$output[$key] = $defaults[$key];
		}
	}

	return $output;
}