function wpmp_switcher_is_mobile_browser() { global $wpmp_switcher_is_mobile_browser; if (!isset($wpmp_switcher_is_mobile_browser)) { if (get_option('wpmp_switcher_detection') == 'deviceatlas' && function_exists('wpmp_deviceatlas_enabled') && wpmp_deviceatlas_enabled()) { $wpmp_switcher_is_mobile_browser = wpmp_deviceatlas_property("mobileDevice") == 1; } else { include_once 'lite_detection.php'; $wpmp_switcher_is_mobile_browser = lite_detection(); } } return $wpmp_switcher_is_mobile_browser; }
function wpmp_transcoder_max_screen_height() { $default = 124; if (function_exists('wpmp_deviceatlas_enabled') && wpmp_deviceatlas_enabled()) { $height = wpmp_deviceatlas_property('usableDisplayHeight'); if (!is_numeric($height)) { return $default; } if ($height < 40) { return 40; } if ($height > 300) { return 300; } return $height - 4; } return $default; }