In this article

filter

pre_jetpack_is_mobile

Filter the value of jetpack_is_mobile before it is calculated. Passing a truthy value to the filter will short-circuit determining the mobile type, returning the passed value instead.

Parameters

$matches
(bool | string)

Boolean if current UA matches $kind or not. If $return_matched_agent is true, should return the UA string

$kind
string

Category of mobile device being checked

$return_matched_agent
bool

Boolean indicating if the UA should be returned

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.