X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..16e7b37c7914d753890c1a05a9335f3b43751eb8:/wp-includes/class-wp-http-cookie.php diff --git a/wp-includes/class-wp-http-cookie.php b/wp-includes/class-wp-http-cookie.php index 95148efd..d2affc2c 100644 --- a/wp-includes/class-wp-http-cookie.php +++ b/wp-includes/class-wp-http-cookie.php @@ -195,7 +195,7 @@ class WP_Http_Cookie { return ''; /** - * Filter the header-encoded cookie value. + * Filters the header-encoded cookie value. * * @since 3.4.0 * @@ -216,4 +216,26 @@ class WP_Http_Cookie { public function getFullHeader() { return 'Cookie: ' . $this->getHeaderValue(); } + + /** + * Retrieves cookie attributes. + * + * @since 4.6.0 + * @access public + * + * @return array { + * List of attributes. + * + * @type string $expires When the cookie expires. + * @type string $path Cookie URL path. + * @type string $domain Cookie domain. + * } + */ + public function get_attributes() { + return array( + 'expires' => $this->expires, + 'path' => $this->path, + 'domain' => $this->domain, + ); + } }