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



wp_remote_retrieve_body › WordPress Function

Since2.7.0
已弃用n/a
wp_remote_retrieve_body ( $response )
参数:
  • (array|WP_Error) $response HTTP response.
    Required: Yes
返回:
  • (string) The body of the response. Empty string if no body or incorrect parameter given.
定义在:
文档:

Retrieve only the body from the raw response.



源码

function wp_remote_retrieve_body( $response ) {
	if ( is_wp_error( $response ) || ! isset( $response['body'] ) ) {
		return '';
	}

	return $response['body'];
}