wp_super_cache_jetpack_cookie_check()
No Hooks.
Returns
null. Nothing (null).
Usage
wp_super_cache_jetpack_cookie_check( $cache_key );
- $cache_key(required)
- .
wp_super_cache_jetpack_cookie_check() wp super cache jetpack cookie check code WPSCache 3.1.1
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\WPSC\Device_Detection' ) ) {
return 'normal';
}
if ( \Automattic\WPSC\Device_Detection::is_phone() ) {
return 'mobile';
} else {
return 'normal';
}
}