protected function prepare_value_for_response( $value, $request, $args ) {
		if ( ! empty( $args['prepare_callback'] ) ) {
			$value = call_user_func( $args['prepare_callback'], $value, $request, $args );
		}

		return $value;
	}
protected function prepare_value_for_response( $value, $request, $args ) {
		if ( ! empty( $args['prepare_callback'] ) ) {
			$value = call_user_func( $args['prepare_callback'], $value, $request, $args );
		}

		return $value;
	}
protected function prepare_value_for_response ( $ value , $ request , $ args ) { if ( ! empty ( $ args [ 'prepare_callback' ] ) ) { $ value = call_user_func ( $ args [ 'prepare_callback' ] , $ value , $ request , $ args ) ; } return $ value ; }
Prepare value for response.

This is required because some native types cannot be stored correctly in
the database, such as booleans. We need to cast back to the relevant
type before passing back to JSON.

@param mixed           $value   Value to prepare.
@param WP_REST_Request $request Current request object.
@param array           $args    Options for the field.
@return mixed Prepared value.
Prepare value for response .