WordPress开发者和主题制作者的搜索引擎



_wp_json_prepare_data ›

Since4.4.0
已弃用5.3.0
_wp_json_prepare_data ( $data )
访问:
  • private
参数:
  • (mixed) $data Native representation.
    Required: Yes
返回:
  • (bool|int|float|null|string|array) Data ready for `json_encode()`.
定义在:
文档:

Prepares response data to be serialized to JSON.

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



源码

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