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.


Top ↑

Source

File: wp-includes/vars.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.