Uses
Uses | Description |
---|---|
wp-includes/class-wp-http-response.php: WP_HTTP_Response::get_data() | Retrieves the response data. |
Retrieves the response data for JSON serialization.
It is expected that in most implementations, this will return the same as get_data(), however this may be different if you want to do custom JSON data handling.
(mixed) Any JSON-serializable value.
File: wp-includes/class-wp-http-response.php
public function jsonSerialize() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid return $this->get_data(); }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_http_response/jsonserialize