WP_Dependencies::add_data( string $handle, string $key, mixed $value ): bool

Add extra item data.

Description

Adds data to a registered item.

Parameters

$handlestringrequired
Name of the item. Should be unique.
$keystringrequired
The data key.
$valuemixedrequired
The data value.

Return

bool True on success, false on failure.

Source

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

	return $this->registered[ $handle ]->add_data( $key, $value );
}

Changelog

VersionDescription
2.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.