PO::export() WordPress Method

The PO::export() method is used to generate a PO file for a given WordPress domain. This is useful if you want to create a translation for a plugin or theme. The PO file will be saved in the specified location.

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

Exports the whole PO file as a string


Parameters

$include_headers

(bool)(Optional)whether to include the headers in the export

Default value: true


Top ↑

Return

(string) ready for inclusion in PO file string for headers and all the enrtries


Top ↑

Source

File: wp-includes/pomo/po.php

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.