wpcf7_strip_quote()CF7 1.0

Strips quote characters surrounding the input.

Хуков нет.

Возвращает

Строку. Processed output.

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

wpcf7_strip_quote( $text );
$text(строка) (обязательный)
Input text.

Код wpcf7_strip_quote() CF7 5.9.3

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;
}