GC_Customize_Manager::get_previewable_devices()

最后更新于:2021-11-27 00:58:33

GC_Customize_Manager::get_previewable_devices()

响应s a list of devices to allow previewing.

响应

(array) List of devices with labels and default setting.

源文件

文件: gc-includes/class-gc-customize-manager.php

	public function get_previewable_devices() {
		$devices = array(
			'desktop' => array(
				'label'   => __( 'Enter desktop preview mode' ),
				'default' => true,
			),
			'tablet'  => array(
				'label' => __( 'Enter tablet preview mode' ),
			),
			'mobile'  => array(
				'label' => __( 'Enter mobile preview mode' ),
			),
		);

		/**
		 * Filters the available devices to allow previewing in the Customizer.
		 *
		 * @since 4.5.0
		 *
		 * @see GC_Customize_Manager::get_previewable_devices()
		 *
		 * @param array $devices List of devices with labels and default setting.
		 */
		$devices = apply_filters( 'customize_previewable_devices', $devices );

		return $devices;
	}