WP_Dependencies::get_data() public WP 3.3.0
Get extra item data.
Gets data associated with a registered item.
{} It's a method of the class: WP_Dependencies{}
No Hooks.
Return
Mixed
. Extra item data (string), false otherwise.
Usage
$WP_Dependencies = new WP_Dependencies(); $WP_Dependencies->get_data( $handle, $key );
- $handle(string) (required)
- Name of the item. Should be unique.
- $key(string) (required)
- The data key.
Changelog
Since 3.3.0 | Introduced. |
Code of WP_Dependencies::get_data() WP Dependencies::get data WP 5.7
public function get_data( $handle, $key ) {
if ( ! isset( $this->registered[ $handle ] ) ) {
return false;
}
if ( ! isset( $this->registered[ $handle ]->extra[ $key ] ) ) {
return false;
}
return $this->registered[ $handle ]->extra[ $key ];
}