- Timestamp:
- 12/17/2018 01:14:17 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43908
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
r44173 r44254 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)