Automattic\Jetpack\Device_Detection

User_Agent_Info::get_desktop_platform()publicWPSCache 1.0

Returns the platform for desktops

Method of the class: User_Agent_Info{}

No Hooks.

Return

String.

Usage

$User_Agent_Info = new User_Agent_Info();
$User_Agent_Info->get_desktop_platform();

User_Agent_Info::get_desktop_platform() code WPSCache 1.12.4

public function get_desktop_platform() {
	$ua = $this->useragent;
	if ( empty( $ua ) ) {
		return false;
	}
	$platform = self::OTHER;

	if ( static::is_linux_desktop() ) {
		$platform = self::PLATFORM_DESKTOP_LINUX;
	} elseif ( static::is_mac_desktop() ) {
		$platform = self::PLATFORM_DESKTOP_MAC;
	} elseif ( static::is_windows_desktop() ) {
		$platform = self::PLATFORM_DESKTOP_WINDOWS;
	} elseif ( static::is_chrome_desktop() ) {
		$platform = self::PLATFORM_DESKTOP_CHROME;
	}
	return $platform;
}