Translations::merge_with()publicWP 2.8.0

Merges other translations into the current one.

Method of the class: Translations{}

No Hooks.

Return

null. Nothing (null).

Usage

$Translations = new Translations();
$Translations->merge_with( $other );
$other(Translations) (required) (passed by reference — &)
Another Translation object, whose translations will be merged in this one (passed by reference).

Changelog

Since 2.8.0 Introduced.

Translations::merge_with() code WP 6.5.2

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