_WP_Dependency::add_data
Add handle data.
Method of the class: _WP_Dependency{}
No Hooks.
Returns
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. |
_WP_Dependency::add_data() WP Dependency::add data code WP 7.0
public function add_data( $name, $data ) {
if ( ! is_scalar( $name ) ) {
return false;
}
$this->extra[ $name ] = $data;
return true;
}