_wp_json_prepare_data()
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.
Internal function — this function is designed to be used by the kernel itself. It is 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( $value );
- $value(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 |
_wp_json_prepare_data() wp json prepare data code WP 6.5.2
function _wp_json_prepare_data( $value ) { _deprecated_function( __FUNCTION__, '5.3.0' ); return $value; }