Automattic\Jetpack\Device_Detection
User_Agent_Info::__construct
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() User Agent Info:: construct WPSCache 3.0.3
public function __construct( $ua = '' ) {
if ( $ua ) {
$this->useragent = $ua;
} elseif ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
$this->useragent = wp_unslash( $_SERVER['HTTP_USER_AGENT'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This class is all about validating.
}
}