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.


Parameters

$handles

(string|string[])(Required)Item handle (string) or item handles (array of strings).


Top ↑

Source

File: wp-includes/class.wp-dependencies.php

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

Top ↑

Changelog

Changelog
VersionDescription
2.6.0Moved from WP_Scripts.
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.