WP_Translations::__get()
Magic getter for backward compatibility.
Method of the class: WP_Translations{}
No Hooks.
Return
Mixed
.
Usage
$WP_Translations = new WP_Translations(); $WP_Translations->__get( $name );
- $name(string) (required)
- Property name.
Changelog
Since 6.5.0 | Introduced. |
WP_Translations::__get() WP Translations:: get code WP 6.7.1
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; }