Automattic\Jetpack\Device_Detection

User_Agent_Info::is_MeeGo()public staticWPSCache 1.0

Detects if the current UA is a MeeGo device (Nokia Smartphone).

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = User_Agent_Info::is_MeeGo();

Код User_Agent_Info::is_MeeGo() WPSCache 1.12.0

public static function is_MeeGo() {

	if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
		return false;
	}

	$ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating.

	if ( false === strpos( $ua, 'meego' ) ) {
		return false;
	} elseif ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) {
		return false;
	} else {
		return true;
	}
}