On this page
do_action( 'customize_preview_init', WP_Customize_Manager $manager )
Fires once the Customizer preview has initialized and JavaScript settings have been printed.
Parameters
$managerWP_Customize_Manager-
WP_Customize_Manager instance.
More Information
This action hook allows you to enqueue assets (such as javascript files) directly in the Theme Customizer only. To output saved settings onto your live site, you still need to output generated CSS using the wp_head hook.
Generally, this hook is used almost exclusively to enqueue a theme-customizer.js file for controlling live previews in WordPress’s Theme Customizer.
For more information, see the Theme Handbook article on the Theme_Customization_API.
Source
File: wp-includes/class-wp-customize-manager.php. View all references
do_action( 'customize_preview_init', $this );
Related
Used By
| Used By | Description |
|---|---|
| WP_Customize_Manager::customize_preview_init() wp-includes/class-wp-customize-manager.php | Prints JavaScript settings. |
Changelog
| Version | Description |
|---|---|
| 3.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/customize_preview_init