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

Add handle data.


Parameters

$name string Required
The data key to add.
$data mixed Required
The data value to add.

Top ↑

Return

bool False if not scalar, true otherwise.


Top ↑

Source

File: wp-includes/class-wp-dependency.php. View all references

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

Top ↑

Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes

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