WP_Interactivity_API::print_router_markup()

In this article

Outputs markup for the @wordpress/interactivity-router script module.

Description

This method prints a div element representing a loading bar visible during navigation.

Source

	public function print_router_markup() {
		echo <<<HTML
			<div
				class="wp-interactivity-router-loading-bar"
				data-wp-interactive="core/router"
				data-wp-class--start-animation="state.navigation.hasStarted"
				data-wp-class--finish-animation="state.navigation.hasFinished"
			></div>
HTML;
	}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

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