Translations::merge_with() WordPress Method

The Translations::merge_with() method is used to merge two translation objects. This is useful when you need to combine translations from different sources. For example, you might want to combine a translation from a theme with a translation from a plugin.

Translations::merge_with( Object $other ) #

Merge $other in the current object.


Parameters

$other

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


Top ↑

Source

File: wp-includes/pomo/translations.php

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.