WP_Translation_File_PHP::export(): string

In this article

Exports translation contents as a string.

Return

string Translation file contents.

Source

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

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.