Changeset 54969
- Timestamp:
- 12/14/2022 01:39:06 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
r54133 r54969 432 432 } 433 433 434 $prepared[ $field_name ] = call_user_func( $field_options['get_callback'], $prepared, $field_name, $request, $this->get_object_type() ); 434 $prepared[ $field_name ] = call_user_func( 435 $field_options['get_callback'], 436 $prepared, 437 $field_name, 438 $request, 439 $this->get_object_type() 440 ); 435 441 } 436 442 … … 443 449 * @since 4.7.0 444 450 * 445 * @param object $ objectData model like WP_Term or WP_Post.446 * @param WP_REST_Request $request Full details about the request.451 * @param object $data_object Data model like WP_Term or WP_Post. 452 * @param WP_REST_Request $request Full details about the request. 447 453 * @return true|WP_Error True on success, WP_Error object if a field cannot be updated. 448 454 */ 449 protected function update_additional_fields_for_object( $ object, $request ) {455 protected function update_additional_fields_for_object( $data_object, $request ) { 450 456 $additional_fields = $this->get_additional_fields(); 451 457 … … 460 466 } 461 467 462 $result = call_user_func( $field_options['update_callback'], $request[ $field_name ], $object, $field_name, $request, $this->get_object_type() ); 468 $result = call_user_func( 469 $field_options['update_callback'], 470 $request[ $field_name ], 471 $data_object, 472 $field_name, 473 $request, 474 $this->get_object_type() 475 ); 463 476 464 477 if ( is_wp_error( $result ) ) {
Note: See TracChangeset
for help on using the changeset viewer.