wp_is_mobile filter-hookWP 4.9.0

Filters whether the request should be treated as coming from a mobile device or not.

Usage

add_filter( 'wp_is_mobile', 'wp_kama_is_mobile_filter' );

/**
 * Function for `wp_is_mobile` filter-hook.
 * 
 * @param bool $is_mobile Whether the request is from a mobile device or not.
 *
 * @return bool
 */
function wp_kama_is_mobile_filter( $is_mobile ){

	// filter...
	return $is_mobile;
}
$is_mobile(true|false)
Whether the request is from a mobile device or not.

Changelog

Since 4.9.0 Introduced.

Where the hook is called

wp_is_mobile()
wp_is_mobile
wp-includes/vars.php 177
return apply_filters( 'wp_is_mobile', $is_mobile );

Where the hook is used in WordPress

Usage not found.