WordPress at a glance
function is not described

_wp_json_prepare_data() WP 4.4.0

Deprecated from version 5.3.0 This function is no longer needed as support for PHP 5.2-5.3 has been dropped.. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Prepares response data to be serialized to JSON.

This supports the JsonSerializable interface for PHP 5.2-5.3 as well.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

true|false|Int|float|null|String|Array. Data ready for json_encode().

Usage

_wp_json_prepare_data( $data );
$data(mixed) (required)
Native representation.

Changelog

Since 4.4.0 Introduced.
Deprecated Since 5.3.0 This function is no longer needed as support for PHP 5.2-5.3
has been dropped.

Code of _wp_json_prepare_data() WP 5.7

<?php
function _wp_json_prepare_data( $data ) {
	_deprecated_function( __FUNCTION__, '5.3.0' );
	return $data;
}