_WP_Dependency::add_data( string $name, mixed $data ): bool

In this article

Add handle data.

Parameters

$namestringrequired
The data key to add.
$datamixedrequired
The data value to add.

Return

bool False if not scalar, true otherwise.

Source

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

Changelog

VersionDescription
2.6.0Introduced.

User Contributed Notes

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