wp_interactivity(): WP_Interactivity_API

In this article

Retrieves the main WP_Interactivity_API instance.

Description

It provides access to the WP_Interactivity_API instance, creating one if it doesn’t exist yet.

Return

WP_Interactivity_API The main WP_Interactivity_API instance.

Source

function wp_interactivity(): WP_Interactivity_API {
	global $wp_interactivity;
	if ( ! ( $wp_interactivity instanceof WP_Interactivity_API ) ) {
		$wp_interactivity = new WP_Interactivity_API();
	}
	return $wp_interactivity;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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