WordPress at a glance
function is not described

WP_Recovery_Mode_Cookie_Service::parse_cookie() private WP 5.2.0

Parses the cookie into its four parts.

{} It's a method of the class: WP_Recovery_Mode_Cookie_Service{}

No Hooks.

Return

Array/WP_Error. Cookie parts array, or error object on failure.

Usage

// private - for code of main (parent) class only
$result = $this->parse_cookie( $cookie );
$cookie(string) (required)
Cookie content.

Changelog

Since 5.2.0 Introduced.

Code of WP_Recovery_Mode_Cookie_Service::parse_cookie() WP 5.5.1

<?php
private function parse_cookie( $cookie ) {
	$cookie = base64_decode( $cookie );
	$parts  = explode( '|', $cookie );

	if ( 4 !== count( $parts ) ) {
		return new WP_Error( 'invalid_format', __( 'Invalid cookie format.' ) );
	}

	return $parts;
}