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.
Method of the class: MobileDetect{}
No Hooks.
Returns
Array.
Usage
$MobileDetect = new MobileDetect(); $MobileDetect->getRules(): array;
MobileDetect::getRules() MobileDetect::getRules code WC 10.3.3
public function getRules(): array
{
static $rules;
if (!$rules) {
$rules = array_merge(
static::$phoneDevices,
static::$tabletDevices,
static::$operatingSystems,
static::$browsers
);
}
return $rules;
}