W3cubDocs

/WordPress

Translations::merge_with( Translations $other )

Merges other translations into the current one.

Parameters

$otherTranslationsrequired
Another Translation object, whose translations will be merged in this one (passed by reference).

Source

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

Changelog

Version Description
2.8.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/translations/merge_with