WordPress at a glance
function is not described

_WP_Dependency::add_data() public WP 2.6.0

Add handle data.

{} It's a method of the class: _WP_Dependency{}

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

true|false. False if not scalar, true otherwise.

Usage

$_WP_Dependency = new _WP_Dependency();
$_WP_Dependency->add_data( $name, $data );
$name(string) (required)
The data key to add.
$data(mixed) (required)
The data value to add.

Changelog

Since 2.6.0 Introduced.

Code of _WP_Dependency::add_data() WP 5.7

<?php
public function add_data( $name, $data ) {
	if ( ! is_scalar( $name ) ) {
		return false;
	}
	$this->extra[ $name ] = $data;
	return true;
}