Docs: Add a slightly less ambiguous list of return types for `rest_ensure_response()`.
See #38398. git-svn-id: https://develop.svn.wordpress.org/trunk@39037 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
deb258cd33
commit
32c7696700
|
@ -443,8 +443,9 @@ function rest_ensure_request( $request ) {
|
|||
* @since 4.4.0
|
||||
*
|
||||
* @param WP_Error|WP_HTTP_Response|mixed $response Response to check.
|
||||
* @return mixed WP_Error if response generated an error, WP_HTTP_Response if response
|
||||
* is a already an instance, otherwise returns a new WP_REST_Response instance.
|
||||
* @return WP_REST_Response|mixed If response generated an error, WP_Error, if response
|
||||
* is already an instance, WP_HTTP_Response, otherwise
|
||||
* returns a new WP_REST_Response instance.
|
||||
*/
|
||||
function rest_ensure_response( $response ) {
|
||||
if ( is_wp_error( $response ) ) {
|
||||
|
|
Loading…
Reference in New Issue