Method
Get arbitrary data.
get_data( string $name, mixed $default = false )
public
Parameters
-
$namestring - The property name.
-
$defaultmixed Defaultfalse - The value to return if the property is not set.
Return
mixed
The property value or $default if not set.
Source
public function get_data( $name, $default = false ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound -- public API parameter name, renaming risks breaking PHP 8 named-argument callers.
if ( array_key_exists( $name, $this->data ) ) {
return $this->data[ $name ];
}
return $default;
} View src/includes/class-theme-my-login.php, line 308 on GitHub
Uses
Used by
Changelog
| Version | Description |
|---|---|
| 7.0 | Introduced. |