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 == get_option('wp_mobile_disable')) { 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); }
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 == get_option('wp_mobile_disable') ) return false; if ( isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'true' ) return true; $is_mobile = jetpack_is_mobile(); return apply_filters( 'jetpack_check_mobile', $is_mobile ); }