block_core_query_ensure_interactivity_dependency()

In this article

This function has been deprecated.

Ensure that the view script has the wp-interactivity dependency.

Source

function block_core_query_ensure_interactivity_dependency() {
	_deprecated_function( __FUNCTION__, '6.5.0', 'wp_register_script_module' );
	global $wp_scripts;
	if (
		isset( $wp_scripts->registered['wp-block-query-view'] ) &&
		! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-query-view']->deps, true )
	) {
		$wp_scripts->registered['wp-block-query-view']->deps[] = 'wp-interactivity';
	}
}

Changelog

VersionDescription
6.5.0This function has been deprecated.
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.