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.
Contents
Parameters
- $other
(Object)(Required)Another Translation object, whose translations will be merged in this one (passed by reference).
Source
File: wp-includes/pomo/translations.php
public function merge_with( &$other ) { foreach ( $other->entries as $entry ) { $this->entries[ $entry->key() ] = $entry; } }
Expand full source codeCollapse full source codeView on TracView on GitHub