WP_Script_Modules::set_in_footer( string $id, bool $in_footer ): bool

In this article

Sets whether a script module should be printed in the footer.

Description

This is only relevant in block themes.

Parameters

$idstringrequired
Script module identifier.
$in_footerboolrequired
Whether to print in the footer.

Return

bool Whether setting the printing location was successful.

Source

public function set_in_footer( string $id, bool $in_footer ): bool {
	if ( ! isset( $this->registered[ $id ] ) ) {
		return false;
	}
	$this->registered[ $id ]['in_footer'] = $in_footer;
	return true;
}

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

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