Translations::merge_with()publicWP 2.8.0

Merges other translations into the current one.

Метод класса: Translations{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Translations = new Translations();
$Translations->merge_with( $other );
$other(Translations) (обязательный) (передается по ссылке — &)
Another Translation object, whose translations will be merged in this one (passed by reference).

Список изменений

С версии 2.8.0 Введена.

Код Translations::merge_with() WP 6.5.2

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