WP_Dependencies::remove() WordPress Method
The WP_Dependencies::remove() function is used to remove a registered dependency from WordPress. This function is typically used to remove a previously registered script or style.
WP_Dependencies::remove( string|string[] $handles ) #
Un-register an item or items.
Contents
Parameters
- $handles
(string|string[])(Required)Item handle (string) or item handles (array of strings).
Source
File: wp-includes/class.wp-dependencies.php
public function remove( $handles ) {
foreach ( (array) $handles as $handle ) {
unset( $this->registered[ $handle ] );
}
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Moved from WP_Scripts. |
| 2.1.0 | Introduced. |