Automattic\Jetpack\Device_Detection

User_Agent_Info::__construct()publicWPSCache 1.0

The constructor.

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

Хуков нет.

Возвращает

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

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

$User_Agent_Info = new User_Agent_Info();
$User_Agent_Info->__construct( $ua );
$ua(строка)
(Optional) User agent.
По умолчанию: ''

Код User_Agent_Info::__construct() WPSCache 1.12.0

public function __construct( $ua = '' ) {
	if ( $ua ) {
		$this->useragent = $ua;
	} elseif ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
		$this->useragent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This class is all about validating.
	}
}