WPCF7_ConfigValidator::supports()publicCF7 1.0

Returns true if the given error code is supported by this instance.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WPCF7_ConfigValidator = new WPCF7_ConfigValidator();
$WPCF7_ConfigValidator->supports( $error_code );
$error_code (обязательный)
-

Код WPCF7_ConfigValidator::supports() CF7 6.0.1

public function supports( $error_code ) {
	if ( isset( $this->include ) ) {
		$supported_codes = array_intersect( self::error_codes, $this->include );
	} else {
		$supported_codes = self::error_codes;
	}

	if ( isset( $this->exclude ) ) {
		$supported_codes = array_diff( $supported_codes, $this->exclude );
	}

	return in_array( $error_code, $supported_codes, true );
}