WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

PO::export_entry() public WP 1.0

Builds a string from the entry for inclusion in PO file

{} Это метод класса: PO{}

Хуков нет.

Возвращает

Строку/false. PO-style formatted string for the entry or false if the entry is empty

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

$result = PO::export_entry( $entry );
$entry(Translation_Entry) (обязательный) (передается по ссылке — &)
the entry to convert to po string (passed by reference).

Код PO::export_entry() WP 5.5.3

<?php
public static function export_entry( &$entry ) {
	if ( null === $entry->singular || '' === $entry->singular ) {
		return false;
	}
	$po = array();
	if ( ! empty( $entry->translator_comments ) ) {
		$po[] = PO::comment_block( $entry->translator_comments );
	}
	if ( ! empty( $entry->extracted_comments ) ) {
		$po[] = PO::comment_block( $entry->extracted_comments, '.' );
	}
	if ( ! empty( $entry->references ) ) {
		$po[] = PO::comment_block( implode( ' ', $entry->references ), ':' );
	}
	if ( ! empty( $entry->flags ) ) {
		$po[] = PO::comment_block( implode( ', ', $entry->flags ), ',' );
	}
	if ( $entry->context ) {
		$po[] = 'msgctxt ' . PO::poify( $entry->context );
	}
	$po[] = 'msgid ' . PO::poify( $entry->singular );
	if ( ! $entry->is_plural ) {
		$translation = empty( $entry->translations ) ? '' : $entry->translations[0];
		$translation = PO::match_begin_and_end_newlines( $translation, $entry->singular );
		$po[]        = 'msgstr ' . PO::poify( $translation );
	} else {
		$po[]         = 'msgid_plural ' . PO::poify( $entry->plural );
		$translations = empty( $entry->translations ) ? array( '', '' ) : $entry->translations;
		foreach ( $translations as $i => $translation ) {
			$translation = PO::match_begin_and_end_newlines( $translation, $entry->plural );
			$po[]        = "msgstr[$i] " . PO::poify( $translation );
		}
	}
	return implode( "\n", $po );
}