Determines whether a sanitized value is, or contains, a WP_Error.
Parameters
$valuemixedrequired- The value to inspect.
Source
private function input_contains_error( $value ): bool {
if ( is_wp_error( $value ) ) {
return true;
}
if ( is_array( $value ) ) {
foreach ( $value as $item ) {
if ( $this->input_contains_error( $item ) ) {
return true;
}
}
}
return false;
}
Changelog
| Version | Description |
|---|---|
| 7.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.