Translations::translate_entry()publicWP 2.8.0

Returns a given translation entry.

Method of the class: Translations{}

No Hooks.

Return

Translation_Entry|false. Translation entry if it exists, false otherwise.

Usage

$Translations = new Translations();
$Translations->translate_entry( $entry );
$entry(Translation_Entry) (required) (passed by reference — &)
Translation entry.

Changelog

Since 2.8.0 Introduced.

Translations::translate_entry() code WP 6.5.3

public function translate_entry( &$entry ) {
	$key = $entry->key();
	return isset( $this->entries[ $key ] ) ? $this->entries[ $key ] : false;
}