Automattic\Jetpack

Device_Detection::is_smartphone()public staticWPSCache 1.0

Detects smartphone devices.

Метод класса: Device_Detection{}

Хуков нет.

Возвращает

true|false.

Использование

$result = Device_Detection::is_smartphone( $ua );
$ua(строка)
User-Agent string.
По умолчанию: ''

Код Device_Detection::is_smartphone() WPSCache 1.12.0

public static function is_smartphone( $ua = '' ) {
	$device_info = self::get_info( $ua );
	return true === $device_info['is_smartphone'];
}