Translation_Entry::key()publicWP 1.0

Generates a unique key for this entry.

Method of the class: Translation_Entry{}

No Hooks.

Return

String|false. The key or false if the entry is null.

Usage

$Translation_Entry = new Translation_Entry();
$Translation_Entry->key();

Translation_Entry::key() code WP 6.1.1

public function key() {
	if ( null === $this->singular ) {
		return false;
	}

	// Prepend context and EOT, like in MO files.
	$key = ! $this->context ? $this->singular : $this->context . "\4" . $this->singular;
	// Standardize on \n line endings.
	$key = str_replace( array( "\r\n", "\r" ), "\n", $key );

	return $key;
}