Automattic\WooCommerce\Vendor\Detection
MobileDetect::getRules
Method gets the mobile detection rules. This method is used for the magic methods $detect->is*(). Retrieve the current set of rules.
Метод класса: MobileDetect{}
Хуков нет.
Возвращает
Массив.
Использование
$MobileDetect = new MobileDetect(); $MobileDetect->getRules(): array;
Код MobileDetect::getRules() MobileDetect::getRules WC 10.4.2
public function getRules(): array
{
static $rules;
if (!$rules) {
$rules = array_merge(
static::$phoneDevices,
static::$tabletDevices,
static::$operatingSystems,
static::$browsers
);
}
return $rules;
}