PO::export_headers

Advertisement

Summery Summery

Exports headers to a PO entry

Syntax Syntax

PO::export_headers()

Return Return

(string) msgid/msgstr PO entry for this PO file headers, doesn't contain newline at the end

Source Source

File: wp-includes/pomo/po.php

		function export_headers() {
			$header_string = '';
			foreach ( $this->headers as $header => $value ) {
				$header_string .= "$header: $value\n";
			}
			$poified = PO::poify( $header_string );
			if ( $this->comments_before_headers ) {
				$before_headers = $this->prepend_each_line( rtrim( $this->comments_before_headers ) . "\n", '# ' );
			} else {
				$before_headers = '';
			}
			return rtrim( "{$before_headers}msgid \"\"\nmsgstr $poified" );
		}

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.