wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_remote_retrieve_cookies › WordPress Function

Da4.4.0
Deprecaton/a
wp_remote_retrieve_cookies ( $response )
Parametri:
  • (array|WP_Error) $response HTTP response.
    Richiesto:
Ritorna:
  • (WP_Http_Cookie[]) An array of `WP_Http_Cookie` objects from the response. Empty array if there are none, or the response is a WP_Error.
Definito a:
Codex:

Retrieve only the cookies from the raw response.



Sorgenti

function wp_remote_retrieve_cookies( $response ) {
	if ( is_wp_error( $response ) || empty( $response['cookies'] ) ) {
		return array();
	}

	return $response['cookies'];
}