WP_Dependencies::get_data()publicWP 3.3.0

Get extra item data.

Gets data associated with a registered item.

Method of the class: WP_Dependencies{}

No Hooks.

Return

Mixed. Extra item data (string), false otherwise.

Usage

$WP_Dependencies = new WP_Dependencies();
$WP_Dependencies->get_data( $handle, $key );
$handle(string) (required)
Name of the item. Should be unique.
$key(string) (required)
The data key.

Changelog

Since 3.3.0 Introduced.

WP_Dependencies::get_data() code WP 6.1.1

public function get_data( $handle, $key ) {
	if ( ! isset( $this->registered[ $handle ] ) ) {
		return false;
	}

	if ( ! isset( $this->registered[ $handle ]->extra[ $key ] ) ) {
		return false;
	}

	return $this->registered[ $handle ]->extra[ $key ];
}