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 Built from https://develop.svn.wordpress.org/trunk@40907 git-svn-id: http://core.svn.wordpress.org/trunk@40757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user