W3cubDocs

/WordPress

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

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

Version Description
6.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_scripts/get_unaliased_deps