wpcf7_strip_quote()
Strips quote characters surrounding the input.
Хуков нет.
Возвращает
Строку
. Processed output.
Использование
wpcf7_strip_quote( $text );
- $text(строка) (обязательный)
- Input text.
Код wpcf7_strip_quote() wpcf7 strip quote CF7 6.0.2
function wpcf7_strip_quote( $text ) { $text = trim( $text ); if ( preg_match( '/^"(.*)"$/s', $text, $matches ) ) { $text = $matches[1]; } elseif ( preg_match( "/^'(.*)'$/s", $text, $matches ) ) { $text = $matches[1]; } return $text; }