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 );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.