WP_Scripts::get_dependency_warning_message
Gets a script-specific dependency warning message.
Method of the class: WP_Scripts{}
No Hooks.
Returns
String. Formatted, localized warning message.
Usage
// protected - for code of main (parent) or child class $result = $this->get_dependency_warning_message( $handle, $missing_dependency_handles );
- $handle(string) (required)
- Script handle with missing dependencies.
- $missing_dependency_handles(string[]) (required)
- Missing dependency handles.
Changelog
| Since 6.9.1 | Introduced. |
WP_Scripts::get_dependency_warning_message() WP Scripts::get dependency warning message code WP 7.0
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 )
);
}