wp_is_mobile WordPress Filter Hook
The wp_is_mobile hook is a boolean value that allows you to determine if the user is viewing the site on a mobile device. This can be useful for serving different content or styles to mobile users.
apply_filters( 'wp_is_mobile', bool $is_mobile ) #
Filters whether the request should be treated as coming from a mobile device or not.
Parameters
- $is_mobile
(bool)Whether the request is from a mobile device or not.
Source
File: wp-includes/vars.php
Changelog
Version | Description |
---|---|
4.9.0 | Introduced. |