function jetpack_check_mobile()
{
if (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST || defined('APP_REQUEST') && APP_REQUEST) {
return false;
}
if (!isset($_SERVER["HTTP_USER_AGENT"]) || isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'false') {
return false;
}
if (jetpack_mobile_exclude()) {
return false;
}
if (1 == Jetpack_Options::get_option_and_ensure_autoload('wp_mobile_disable', '0')) {
return false;
}
if (isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'true') {
return true;
}
$is_mobile = jetpack_is_mobile();
/**
* Filter the Mobile check results.
*
* @module minileven
*
* @since 1.8.0
*
* @param bool $is_mobile Is the reader on a mobile device.
*/
return apply_filters('jetpack_check_mobile', $is_mobile);
}