Translations::add_entry

Advertisement

Summery Summery

Add entry to the PO structure

Syntax Syntax

Translations::add_entry( array|Translation_Entry $entry )

Parameters Parameters

$entry

(Required)

Return Return

(bool) true on success, false if the entry doesn't have a key

Source Source

File: wp-includes/pomo/translations.php

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

Advertisement

Advertisement

Leave a Reply