WP_Translations::__get( string $name )
Magic getter for backward compatibility.
Parameters
- $name
-
(string) (Required) Property name.
Return
(mixed)
Source
File: wp-includes/l10n/class-wp-translations.php
public function __get( string $name ) {
if ( 'entries' === $name ) {
$entries = $this->controller->get_entries( $this->textdomain );
$result = array();
foreach ( $entries as $original => $translations ) {
$result[] = $this->make_entry( $original, $translations );
}
return $result;
}
if ( 'headers' === $name ) {
return $this->controller->get_headers( $this->textdomain );
}
return null;
}
Changelog
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |