WPCF7_FormTag::get_all_match_options()publicCF7 1.0

Retrieves values of options that match the given regular expression pattern.

Метод класса: WPCF7_FormTag{}

Хуков нет.

Возвращает

Массив. Array of arrays of strings that match the pattern.

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

$WPCF7_FormTag = new WPCF7_FormTag();
$WPCF7_FormTag->get_all_match_options( $pattern );
$pattern(строка) (обязательный)
Regular expression pattern.

Код WPCF7_FormTag::get_all_match_options() CF7 5.6.4

public function get_all_match_options( $pattern ) {
	$result = array();

	foreach( (array) $this->options as $option ) {
		if ( preg_match( $pattern, $option, $matches ) ) {
			$result[] = $matches;
		}
	}

	return $result;
}