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:
John Blackbourn 2017-06-15 12:05:42 +00:00
parent 523b08600f
commit a72ec29c4d
2 changed files with 9 additions and 2 deletions

View File

@ -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 );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-40906';
$wp_version = '4.9-alpha-40907';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.