WP_Translation_File_PHP::export()

Exports translation contents as a string.


Return

(string) Translation file contents.


Source

File: wp-includes/l10n/class-wp-translation-file-php.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;
	}


Changelog

Changelog
Version Description
6.5.0 Introduced.