wp_super_cache_jetpack_cookie_check() WPSCache 1.0
No Hooks.
Return
Null. Nothing.
Usage
wp_super_cache_jetpack_cookie_check( $cache_key );
Code of wp_super_cache_jetpack_cookie_check() wp super cache jetpack cookie check WPSCache 1.7.1
function wp_super_cache_jetpack_cookie_check( $cache_key ) {
if ( false === function_exists( 'jetpack_is_mobile' ) ) {
if ( file_exists( dirname( WPCACHEHOME ) . '/jetpack-dev/class.jetpack-user-agent.php' ) ) {
wp_cache_debug( "wp_super_cache_jetpack_cookie_check: jetpack dev detected. Returning 'normal' to avoid loading Jetpack." );
return 'normal';
} elseif ( file_exists( dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php' ) ) {
include_once dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php';
} else {
wp_cache_debug( 'wp_super_cache_jetpack_cookie_check: jetpack UA file not found.' );
}
}
if ( isset ( $_COOKIE['akm_mobile'] ) ) {
if ( $_COOKIE['akm_mobile'] == 'true' ) {
return 'mobile';
} elseif ( $_COOKIE['akm_mobile'] == 'false' ) {
return 'normal';
}
}
if ( function_exists( 'jetpack_is_mobile' ) ) {
if ( jetpack_is_mobile() ) {
return 'mobile';
} else {
return 'normal';
}
} else {
return 'normal';
}
}