W3cubDocs

/WordPress

PO::export( bool $include_headers = true ): string

Exports the whole PO file as a string

Parameters

$include_headersbooloptional
whether to include the headers in the export

Default:true

Return

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

Source

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

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/po/export