WP_Dependencies::remove
Un-register an item or items.
Method of the class: WP_Dependencies{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_Dependencies = new WP_Dependencies(); $WP_Dependencies->remove( $handles );
- $handles(string|string[]) (required)
- Item handle (string) or item handles (array of strings).
Changelog
| Since 2.1.0 | Introduced. |
| Since 2.6.0 | Moved from WP_Scripts. |
WP_Dependencies::remove() WP Dependencies::remove code WP 6.9.1
public function remove( $handles ) {
foreach ( (array) $handles as $handle ) {
unset( $this->registered[ $handle ] );
}
}