Translations::merge_originals_with() WordPress Method

The Translations::merge_originals_with() method is used to merge the original strings with the translated strings. This is useful when you need to update the original strings and want to keep the translated strings up-to-date.

Translations::merge_originals_with( object $other ) #


Parameters

$other

(object)(Required)


Top ↑

Source

File: wp-includes/pomo/translations.php

		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 );
				}
			}
		}

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.