wp_cache_get_cookies_values()WPSCache 1.0

No Hooks.

Return

null. Nothing.

Usage

wp_cache_get_cookies_values();

Code of wp_cache_get_cookies_values() WPSCache 1.8

function wp_cache_get_cookies_values() {
	global $wpsc_cookies;
	static $string = '';

	if ( $string != '' ) {
		wp_cache_debug( "wp_cache_get_cookies_values: cached: $string" );
		return $string;
	}

	if ( defined( 'COOKIEHASH' ) ) {
		$cookiehash = preg_quote( constant( 'COOKIEHASH' ) );
	} else {
		$cookiehash = '';
	}
	$regex = "/^wp-postpass_$cookiehash|^comment_author_$cookiehash";
	if ( defined( 'LOGGED_IN_COOKIE' ) ) {
		$regex .= '|^' . preg_quote( constant( 'LOGGED_IN_COOKIE' ) );
	} else {
		$regex .= "|^wordpress_logged_in_$cookiehash";
	}
	$regex .= '/';
	while ( $key = key( $_COOKIE ) ) {
		if ( preg_match( $regex, $key ) ) {
			wp_cache_debug( 'wp_cache_get_cookies_values: Login/postpass cookie detected' );
			$string .= $_COOKIE[ $key ] . ',';
		}
		next( $_COOKIE );
	}
	reset( $_COOKIE );

	// If you use this hook, make sure you update your .htaccess rules with the same conditions
	$string = do_cacheaction( 'wp_cache_get_cookies_values', $string );

	if (
		isset( $wpsc_cookies ) &&
		is_array( $wpsc_cookies ) &&
		! empty( $wpsc_cookies )
	) {
		foreach ( $wpsc_cookies as $name ) {
			if ( isset( $_COOKIE[ $name ] ) ) {
				wp_cache_debug( "wp_cache_get_cookies_values - found extra cookie: $name" );
				$string .= $name . '=' . $_COOKIE[ $name ] . ',';
			}
		}
	}

	if ( $string != '' ) {
		$string = md5( $string );
	}

	wp_cache_debug( "wp_cache_get_cookies_values: return: $string", 5 );
	return $string;
}