WPCF7_ConfigValidator::has_error
Returns true if the specified section has the specified error.
Метод класса: WPCF7_ConfigValidator{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WPCF7_ConfigValidator = new WPCF7_ConfigValidator(); $WPCF7_ConfigValidator->has_error( $section, $code );
- $section(строка) (обязательный)
- The section where the error detected.
- $code(строка) (обязательный)
- The unique code of the error.
Код WPCF7_ConfigValidator::has_error() WPCF7 ConfigValidator::has error CF7 6.1.5
public function has_error( $section, $code ) {
if ( empty( $this->errors[$section] ) ) {
return false;
}
foreach ( (array) $this->errors[$section] as $error ) {
if ( isset( $error['code'] ) and $error['code'] === $code ) {
return true;
}
}
return false;
}