WP_Translation_File_PHP::export()publicWP 6.5.0

Exports translation contents as a string.

Метод класса: WP_Translation_File_PHP{}

Хуков нет.

Возвращает

Строку. Translation file contents.

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

$WP_Translation_File_PHP = new WP_Translation_File_PHP();
$WP_Translation_File_PHP->export(): string;

Список изменений

С версии 6.5.0 Введена.

Код WP_Translation_File_PHP::export() WP 6.6.2

<?php
public function export(): string {
	$data = array_merge( $this->headers, array( 'messages' => $this->entries ) );

	return '<?php' . PHP_EOL . 'return ' . $this->var_export( $data ) . ';' . PHP_EOL;
}