General: Introduce a wp_is_mobile
filter for controlling whether a request should be treated as coming from a mobile device.
Props PressLabs Fixes #41023 git-svn-id: https://develop.svn.wordpress.org/trunk@40907 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b20ed14939
commit
5d13bdd1ef
@ -139,5 +139,12 @@ function wp_is_mobile() {
|
||||
$is_mobile = false;
|
||||
}
|
||||
|
||||
return $is_mobile;
|
||||
/**
|
||||
* Filters whether the request should be treated as coming from a mobile device or not.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param bool $is_mobile Whether the request is from a mobile device or not.
|
||||
*/
|
||||
return apply_filters( 'wp_is_mobile', $is_mobile );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user