A WordPress-centric search engine for devs and theme authors



_wp_json_prepare_data ›

Since4.4.0
Deprecated5.3.0
_wp_json_prepare_data ( $data )
Access:
  • private
Parameters:
  • (mixed) $data Native representation.
    Required: Yes
Returns:
  • (bool|int|float|null|string|array) Data ready for `json_encode()`.
Defined at:
Codex:

Prepares response data to be serialized to JSON.

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



Source

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