Translations::add_entry()
最后更新于:2021-11-26 04:32:19
Translations::add_entry( array|Translation_Entry$entry)Add entry to the PO structure
参数
- $entry
-
(array|Translation_Entry) (Required)
响应
(bool) true on success, false if the entry doesn’t have a key
源文件
文件: gc-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;
}