WP_Translations::__get( string $name ): mixed

In this article

Magic getter for backward compatibility.

Parameters

$namestringrequired
Property name.

Return

mixed

Source

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

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.