Translations::add_entry_or_merge

Advertisement

Syntax Syntax

Translations::add_entry_or_merge( array|Translation_Entry $entry )

Parameters Parameters

$entry

(Required)

Return Return

(bool)

Source Source

File: wp-includes/pomo/translations.php

		function add_entry_or_merge( $entry ) {
			if ( is_array( $entry ) ) {
				$entry = new Translation_Entry( $entry );
			}
			$key = $entry->key();
			if ( false === $key ) {
				return false;
			}
			if ( isset( $this->entries[ $key ] ) ) {
				$this->entries[ $key ]->merge_with( $entry );
			} else {
				$this->entries[ $key ] = &$entry;
			}
			return true;
		}

Advertisement

Advertisement

Leave a Reply