W3cubDocs

/WordPress

WP_Dependencies::remove( string|string[] $handles )

Un-register an item or items.

Parameters

$handlesstring|string[]required
Item handle (string) or item handles (array of strings).

Source

public function remove( $handles ) {
	foreach ( (array) $handles as $handle ) {
		unset( $this->registered[ $handle ] );
	}
}

Changelog

Version Description
2.6.0 Moved from WP_Scripts.
2.1.0 Introduced.

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