diff --git a/src/wp-includes/vars.php b/src/wp-includes/vars.php index 2e97c9a0ae..89b3532327 100644 --- a/src/wp-includes/vars.php +++ b/src/wp-includes/vars.php @@ -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 ); }