Index: wp-includes/vars.php
===================================================================
--- wp-includes/vars.php	(revision 40750)
+++ wp-includes/vars.php	(working copy)
@@ -139,5 +139,12 @@
 		$is_mobile = false;
 	}
 
-	return $is_mobile;
+	/**
+	 * Filters weather the request should be treated as mobile or not.
+	 *
+	 * @since 4.8.1
+	 *
+	 * @param bool $is_mobile Whether the request is from a mobile device or not.
+	 */
+	return apply_filters( 'wp_is_mobile', $is_mobile );
 }
