WPCF7_ConfigValidator::remove_error()publicCF7 1.0

Removes an error.

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

Хуков нет.

Возвращает

null. Ничего.

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

$WPCF7_ConfigValidator = new WPCF7_ConfigValidator();
$WPCF7_ConfigValidator->remove_error( $section, $code );
$section (обязательный)
-
$code (обязательный)
-

Код WPCF7_ConfigValidator::remove_error() CF7 5.6.3

public function remove_error( $section, $code ) {
	if ( empty( $this->errors[$section] ) ) {
		return;
	}

	foreach ( (array) $this->errors[$section] as $key => $error ) {
		if ( isset( $error['code'] )
		and $error['code'] == $code ) {
			unset( $this->errors[$section][$key] );
		}
	}

	if ( empty( $this->errors[$section] ) ) {
		unset( $this->errors[$section] );
	}
}