function wpr_detect_mobile_device() { try { $config = new WurflCloud_Client_Config(); $config->api_key = WPR_API_KEY; $client = new WurflCloud_Client_Client($config); $client->detectDevice(); return $client->getDeviceCapability('is_wireless_device'); } catch (Exception $e) { return wp_is_mobile(); } }
function mf_is_mobile_device() { try { $config = new WurflCloud_Client_Config(); $config->api_key = '673289:CNry9beZIoP38Kn2z1WRQcAU6Fqd0TwS'; $client = new WurflCloud_Client_Client($config); $client->detectDevice(); return $client->getDeviceCapability('is_wireless_device'); } catch (Exception $e) { return wp_is_mobile(); } }