WP_Scripts::get_dependency_warning_message( string $handle, string[] $missing_dependency_handles ): string

In this article

Gets a script-specific dependency warning message.

Parameters

$handlestringrequired
Script handle with missing dependencies.
$missing_dependency_handlesstring[]required
Missing dependency handles.

Return

string Formatted, localized warning message.

Source

protected function get_dependency_warning_message( $handle, $missing_dependency_handles ) {
	return sprintf(
		/* translators: 1: Script handle, 2: List of missing dependency handles. */
		__( 'The script with the handle "%1$s" was enqueued with dependencies that are not registered: %2$s.' ),
		$handle,
		implode( wp_get_list_item_separator(), $missing_dependency_handles )
	);
}

Changelog

VersionDescription
6.9.1Introduced.

User Contributed Notes

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