wpcf7_canonicalize() CF7 1.0
Хуков нет.
Возвращает
Null. Ничего.
Использование
wpcf7_canonicalize( $text, $strto );
- $text (обязательный)
- -
- $strto **
- -
По умолчанию: 'lower'
Код wpcf7_canonicalize() wpcf7 canonicalize CF7 5.4
function wpcf7_canonicalize( $text, $strto = 'lower' ) {
if ( function_exists( 'mb_convert_kana' )
and 'UTF-8' == get_option( 'blog_charset' ) ) {
$text = mb_convert_kana( $text, 'asKV', 'UTF-8' );
}
if ( 'lower' == $strto ) {
$text = strtolower( $text );
} elseif ( 'upper' == $strto ) {
$text = strtoupper( $text );
}
$text = trim( $text );
return $text;
}