wp_super_cache_jetpack_cookie_check()WPSCache 1.0

No Hooks.

Return

null. Nothing (null).

Usage

wp_super_cache_jetpack_cookie_check( $cache_key );
$cache_key (required)
-

wp_super_cache_jetpack_cookie_check() code WPSCache 1.12.0

function wp_super_cache_jetpack_cookie_check( $cache_key ) {
	if ( isset ( $_COOKIE['akm_mobile'] ) ) {
		if ( $_COOKIE['akm_mobile'] == 'true' ) {
			return 'mobile';
		} elseif ( $_COOKIE['akm_mobile'] == 'false' ) {
			return 'normal';
		}
	}

	if ( ! class_exists( 'Automattic\Jetpack\Device_Detection' ) ) {
		return 'normal';
	}

	if ( \Automattic\Jetpack\Device_Detection::is_phone() ) {
		return 'mobile';
	} else {
		return 'normal';
	}
}