wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
rest_validate_boolean_value_from_schema › WordPress Function
Seit5.7.0
Veraltetn/v
› rest_validate_boolean_value_from_schema ( $value, $param )
| Parameter: (2) |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Validates a boolean value based on a schema.
Quellcode
function rest_validate_boolean_value_from_schema( $value, $param ) {
if ( ! rest_is_boolean( $value ) ) {
return new WP_Error(
'rest_invalid_type',
/* translators: 1: Parameter, 2: Type name. */
sprintf( __( '%1$s is not of type %2$s.' ), $param, 'boolean' ),
array( 'param' => $param )
);
}
return true;
}