Translations::merge_originals_with( Translations $other )

In this article

Merges originals with existing entries.

Parameters

$otherTranslationsrequired

Source

public function merge_originals_with( &$other ) {
	foreach ( $other->entries as $entry ) {
		if ( ! isset( $this->entries[ $entry->key() ] ) ) {
			$this->entries[ $entry->key() ] = $entry;
		} else {
			$this->entries[ $entry->key() ]->merge_with( $entry );
		}
	}
}

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

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