jetpack_device_detection_get_info
Filter the value of Device_Detection::get_info.
Usage
add_filter( 'jetpack_device_detection_get_info', 'wp_kama_jetpack_device_detection_get_info_filter', 10, 3 ); /** * Function for `jetpack_device_detection_get_info` filter-hook. * * @param array $info Array of device information. * @param string $ua User agent string passed to Device_Detection::get_info. * @param User_Agent_Info $ua_info Instance of Automattic\Jetpack\Device_Detection\User_Agent_Info. * * @return array */ function wp_kama_jetpack_device_detection_get_info_filter( $info, $ua, $ua_info ){ // filter... return $info; }
- $info(array)
- Array of device information.
- $ua(string)
- User agent string passed to Device_Detection::get_info.
- $ua_info(User_Agent_Info)
- Instance of Automattic\Jetpack\Device_Detection\User_Agent_Info.
Changelog
Since 1.0.0 | Introduced. |
Where the hook is called
jetpack_device_detection_get_info
wp-super-cache/vendor/automattic/jetpack-device-detection/src/class-device-detection.php 93
$info = apply_filters( 'jetpack_device_detection_get_info', $info, $ua, $ua_info );