Translation_Entry::merge_with()publicWP 2.8.0

Merges another translation entry with the current one.

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

Хуков нет.

Возвращает

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

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

$Translation_Entry = new Translation_Entry();
$Translation_Entry->merge_with( $other );
$other(Translation_Entry) (обязательный) (передается по ссылке — &)
Other translation entry.

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

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

Код Translation_Entry::merge_with() WP 6.5.2

public function merge_with( &$other ) {
	$this->flags      = array_unique( array_merge( $this->flags, $other->flags ) );
	$this->references = array_unique( array_merge( $this->references, $other->references ) );
	if ( $this->extracted_comments !== $other->extracted_comments ) {
		$this->extracted_comments .= $other->extracted_comments;
	}
}