PO::export()publicWP 1.0

Exports the whole PO file as a string

Method of the class: PO{}

No Hooks.

Return

String. ready for inclusion in PO file string for headers and all the entries

Usage

$PO = new PO();
$PO->export( $include_headers );
$include_headers(true|false)
whether to include the headers in the export
Default: true

PO::export() code WP 6.5.2

public function export( $include_headers = true ) {
	$res = '';
	if ( $include_headers ) {
		$res .= $this->export_headers();
		$res .= "\n\n";
	}
	$res .= $this->export_entries();
	return $res;
}