WP_Interactivity_API::process_directives( string $html ): string

In this article

Processes the interactivity directives contained within the HTML content and updates the markup accordingly.

Parameters

$htmlstringrequired
The HTML content to process.

Return

string The processed HTML content. It returns the original content when the HTML contains unbalanced tags.

Source

 */
public function filter_script_module_interactivity_router_data( array $data ): array {
	if ( ! isset( $data['i18n'] ) ) {
		$data['i18n'] = array();
	}
	$data['i18n']['loading'] = __( 'Loading page, please wait.' );
	$data['i18n']['loaded']  = __( 'Page Loaded.' );
	return $data;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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