WP_Customize_Selective_Refresh::enqueue_preview_scripts() WordPress Method
This function is used to enqueue preview scripts for selective refresh. It is important to note that this function should only be called after the selective refresh partial has been registered. Calling this function too early will result in an error.
WP_Customize_Selective_Refresh::enqueue_preview_scripts() #
Enqueues preview scripts.
Source
File: wp-includes/customize/class-wp-customize-selective-refresh.php
public function enqueue_preview_scripts() { wp_enqueue_script( 'customize-selective-refresh' ); add_action( 'wp_footer', array( $this, 'export_preview_data' ), 1000 ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |