jetpack_device_detection_get_info хук-фильтрWPSCache 1.0.0

Filter the value of Device_Detection::get_info.

Использование

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 of device information.
$ua(строка)
User agent string passed to Device_Detection::get_info.
$ua_info(User_Agent_Info)
Instance of Automattic\Jetpack\Device_Detection\User_Agent_Info.

Список изменений

С версии 1.0.0 Введена.

Где вызывается хук

Device_Detection::get_info()
jetpack_device_detection_get_info
wp-super-cache/vendor/automattic/jetpack-device-detection/src/class-device-detection.php 67
$info = apply_filters( 'jetpack_device_detection_get_info', $info, $ua, $ua_info );

Где используется хук в WP Super Cache

Использование не найдено.