rest_find_one_matching_schema


rest_find_one_matching_schema ( $value, $args, $param, $stop_after_first_match = false )

Parameters:
  • (mixed) value The value to validate.
  • (array) args The schema array to use.
  • (string) param The parameter name, used in error messages.
  • (bool) stop_after_first_match Optional. Whether the process should stop after the first successful match.
Returns:
  • (array|WP_Error) The matching schema or WP_Error instance if the number of matching schemas is not equal to one.
Defined at:

Description

Finds the matching schema among the "oneOf" schemas.

Related Functions

rest_find_any_matching_schema, rest_find_matching_pattern_property_schema, rest_handle_multi_type_schema, get_block_metadata_i18n_schema, rest_get_endpoint_args_for_schema

Top Google Results

User discussions

wpseek mobile