Changeset 56093
- Timestamp:
- 06/28/2023 03:51:23 PM (16 months ago)
- Location:
- trunk/src/wp-includes/rest-api/endpoints
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-pattern-categories-controller.php
r55692 r56093 126 126 */ 127 127 public function get_item_schema() { 128 if ( $this->schema ) { 129 return $this->add_additional_fields_schema( $this->schema ); 130 } 131 128 132 $schema = array( 129 133 '$schema' => 'http://json-schema.org/draft-04/schema#', … … 152 156 ); 153 157 154 return $this->add_additional_fields_schema( $schema ); 158 $this->schema = $schema; 159 160 return $this->add_additional_fields_schema( $this->schema ); 155 161 } 156 162 } -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-patterns-controller.php
r56063 r56093 200 200 */ 201 201 public function get_item_schema() { 202 if ( $this->schema ) { 203 return $this->add_additional_fields_schema( $this->schema ); 204 } 205 202 206 $schema = array( 203 207 '$schema' => 'http://json-schema.org/draft-04/schema#', … … 288 292 ); 289 293 290 return $this->add_additional_fields_schema( $schema ); 294 $this->schema = $schema; 295 296 return $this->add_additional_fields_schema( $this->schema ); 291 297 } 292 298 } -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php
r52582 r56093 68 68 */ 69 69 public function get_item_schema() { 70 if ( $this->schema ) { 71 return $this->add_additional_fields_schema( $this->schema ); 72 } 73 70 74 // Do not cache this schema because all properties are derived from parent controller. 71 75 $schema = parent::get_item_schema(); … … 87 91 unset( $schema['properties']['content']['properties']['rendered'] ); 88 92 89 return $schema; 93 $this->schema = $schema; 94 95 return $this->add_additional_fields_schema( $this->schema ); 90 96 } 91 97 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
r55822 r56093 711 711 */ 712 712 public function get_item_schema() { 713 if ( $this->schema ) { 714 return $this->add_additional_fields_schema( $this->schema ); 715 } 716 713 717 $schema = array( 714 718 '$schema' => 'http://json-schema.org/draft-04/schema#', … … 915 919 } 916 920 917 return $this->add_additional_fields_schema( $schema ); 921 $this->schema = $schema; 922 923 return $this->add_additional_fields_schema( $this->schema ); 918 924 } 919 925 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php
r55822 r56093 524 524 */ 525 525 public function get_item_schema() { 526 if ( $this->schema ) { 527 return $this->add_additional_fields_schema( $this->schema ); 528 } 529 526 530 $schema = parent::get_item_schema(); 527 531 unset( $schema['properties']['count'], $schema['properties']['link'], $schema['properties']['taxonomy'] ); … … 567 571 ); 568 572 569 return $schema; 573 $this->schema = $schema; 574 575 return $this->add_additional_fields_schema( $this->schema ); 570 576 } 571 577 }
Note: See TracChangeset
for help on using the changeset viewer.