wpcf7_sanitize_messages()
Sanitizes the messages property data.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wpcf7_sanitize_messages( $input, $defaults );
- $input (обязательный)
- -
- $defaults **
- -
По умолчанию: array()
Код wpcf7_sanitize_messages() wpcf7 sanitize messages CF7 6.0.2
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; }