customize_previewable_devices
Filters the available devices to allow previewing in the Customizer.
Использование
add_filter( 'customize_previewable_devices', 'wp_kama_customize_previewable_devices_filter' );
/**
* Function for `customize_previewable_devices` filter-hook.
*
* @param array $devices List of devices with labels and default setting.
*
* @return array
*/
function wp_kama_customize_previewable_devices_filter( $devices ){
// filter...
return $devices;
}
- $devices(массив)
- List of devices with labels and default setting.
Список изменений
| С версии 4.5.0 | Введена. |
Где вызывается хук
customize_previewable_devices
wp-includes/class-wp-customize-manager.php 5058
$devices = apply_filters( 'customize_previewable_devices', $devices );