Filter hook 'customize_previewable_devices'

in WP Core File wp-includes/class-wp-customize-manager.php at line 5059

View Source

customize_previewable_devices

Filter Hook
Description
Filters the available devices to allow previewing in the Customizer.

Hook Information

File Location wp-includes/class-wp-customize-manager.php View on GitHub
Hook Type Filter
Line Number 5059

Hook Parameters

Type Name Description
array $devices List of devices with labels and default setting.

Usage Examples

Basic Usage
<?php
// Hook into customize_previewable_devices
add_filter('customize_previewable_devices', 'my_custom_filter', 10, 1);

function my_custom_filter($devices) {
    // Your custom filtering logic here
    return $devices;
}

Source Code Context

wp-includes/class-wp-customize-manager.php:5059 - How this hook is used in WordPress core
<?php
5054  		 *
5055  		 * @see WP_Customize_Manager::get_previewable_devices()
5056  		 *
5057  		 * @param array $devices List of devices with labels and default setting.
5058  		 */
5059  		$devices = apply_filters( 'customize_previewable_devices', $devices );
5060  
5061  		return $devices;
5062  	}
5063  
5064  	/**

PHP Documentation

<?php
/**
		 * Filters the available devices to allow previewing in the Customizer.
		 *
		 * @since 4.5.0
		 *
		 * @see WP_Customize_Manager::get_previewable_devices()
		 *
		 * @param array $devices List of devices with labels and default setting.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/class-wp-customize-manager.php
Related Hooks

Related hooks will be displayed here in future updates.