wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_remote_retrieve_cookies › WordPress Function

Od4.4.0
Przestarzałyn/a
wp_remote_retrieve_cookies ( $response )
Parametry:
  • (array|WP_Error) $response HTTP response.
    Wymagane: Tak
Powrót:
  • (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.
Zdefiniowane na:
Codex:

Retrieve only the cookies from the raw response.



Źródło

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

	return $response['cookies'];
}