- Timestamp:
- 11/19/2018 02:09:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
r43834 r43908 520 520 $schema = $this->get_item_schema(); 521 521 $fields = isset( $schema['properties'] ) ? array_keys( $schema['properties'] ) : array(); 522 523 $additional_fields = $this->get_additional_fields(); 524 foreach ( $additional_fields as $field_name => $field_options ) { 525 // For back-compat, include any field with an empty schema 526 // because it won't be present in $this->get_item_schema(). 527 if ( is_null( $field_options['schema'] ) ) { 528 $fields[] = $field_name; 529 } 530 } 531 522 532 if ( ! isset( $request['_fields'] ) ) { 523 533 return $fields;
Note: See TracChangeset
for help on using the changeset viewer.