WP_Scripts::get_unaliased_deps( string[] $deps ): string[]

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Gets unaliased dependencies.

Description

An alias is a dependency whose src is false. It is used as a way to bundle multiple dependencies in a single handle. This in effect flattens an alias dependency tree.

Parameters

$depsstring[]required
Dependency handles.

Return

string[] Unaliased handles.

Source

public function get_inline_script_tag( $handle, $position = 'after' ) {
	$js = $this->get_inline_script_data( $handle, $position );
	if ( empty( $js ) ) {
		return '';
	}

	$id = "{$handle}-js-{$position}";

	return wp_get_inline_script_tag( $js, compact( 'id' ) );
}

/**
 * Localizes a script, only if the script has already been added.
 *
 * @since 2.1.0

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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