wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
rest_find_matching_pattern_property_schema › WordPress Function
Depuis5.6.0
Dépréciéen/a
› rest_find_matching_pattern_property_schema ( $property, $args )
| Paramètres: (2) |
|
| Retourne: |
|
| Défini(e) dans: |
|
| Codex: |
Finds the schema for a property using the patternProperties keyword.
Source
function rest_find_matching_pattern_property_schema( $property, $args ) {
if ( isset( $args['patternProperties'] ) ) {
foreach ( $args['patternProperties'] as $pattern => $child_schema ) {
if ( rest_validate_json_schema_pattern( $pattern, $property ) ) {
return $child_schema;
}
}
}
return null;
}