_WP_Dependency::add_data( string $name, mixed $data )
Add handle data.
Parameters
- $name
-
(string) (Required) The data key to add.
- $data
-
(mixed) (Required) The data value to add.
Return
(bool) False if not scalar, true otherwise.
Source
File: wp-includes/class-wp-dependency.php
public function add_data( $name, $data ) {
if ( ! is_scalar( $name ) ) {
return false;
}
$this->extra[ $name ] = $data;
return true;
} Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/_wp_dependency/add_data