diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php index 61591cb6c1..c1de3946c0 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php @@ -431,7 +431,13 @@ abstract class WP_REST_Controller { continue; } - $prepared[ $field_name ] = call_user_func( $field_options['get_callback'], $prepared, $field_name, $request, $this->get_object_type() ); + $prepared[ $field_name ] = call_user_func( + $field_options['get_callback'], + $prepared, + $field_name, + $request, + $this->get_object_type() + ); } return $prepared; @@ -442,11 +448,11 @@ abstract class WP_REST_Controller { * * @since 4.7.0 * - * @param object $object Data model like WP_Term or WP_Post. - * @param WP_REST_Request $request Full details about the request. + * @param object $data_object Data model like WP_Term or WP_Post. + * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True on success, WP_Error object if a field cannot be updated. */ - protected function update_additional_fields_for_object( $object, $request ) { + protected function update_additional_fields_for_object( $data_object, $request ) { $additional_fields = $this->get_additional_fields(); foreach ( $additional_fields as $field_name => $field_options ) { @@ -459,7 +465,14 @@ abstract class WP_REST_Controller { continue; } - $result = call_user_func( $field_options['update_callback'], $request[ $field_name ], $object, $field_name, $request, $this->get_object_type() ); + $result = call_user_func( + $field_options['update_callback'], + $request[ $field_name ], + $data_object, + $field_name, + $request, + $this->get_object_type() + ); if ( is_wp_error( $result ) ) { return $result; diff --git a/wp-includes/version.php b/wp-includes/version.php index 6daa619d97..742f89a0fa 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-54968'; +$wp_version = '6.2-alpha-54969'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.