- Timestamp:
- 07/10/2023 10:58:33 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
r55104 r56193 577 577 578 578 foreach ( $additional_fields as $field_name => $field_options ) { 579 // For back-compat, include any field with an empty schema 580 // because it won't be present in $this->get_item_schema(). 579 /* 580 * For back-compat, include any field with an empty schema 581 * because it won't be present in $this->get_item_schema(). 582 */ 581 583 if ( is_null( $field_options['schema'] ) ) { 582 584 $properties[ $field_name ] = $field_options; … … 631 633 // Check for nested fields if $field is not a direct match. 632 634 $nested_fields = explode( '.', $field ); 633 // A nested field is included so long as its top-level property 634 // is present in the schema. 635 /* 636 * A nested field is included so long as its top-level property 637 * is present in the schema. 638 */ 635 639 if ( in_array( $nested_fields[0], $fields, true ) ) { 636 640 $response_fields[] = $field;
Note: See TracChangeset
for help on using the changeset viewer.