Uses
Uses | Description |
---|---|
wp-includes/pomo/po.php: PO::poify() | Formats a string in PO-style |
wp-includes/pomo/po.php: PO::prepend_each_line() | Inserts $with in the beginning of every new line of $string and returns the modified string |
Exports headers to a PO entry
(string) msgid/msgstr PO entry for this PO file headers, doesn't contain newline at the end
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" ); }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/po/export_headers