Get extra item data.
Description
Gets data associated with a registered item.
Parameters
$handle
stringrequired- Name of the item. Should be unique.
$key
stringrequired- The data key.
Source
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 ];
}
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.