wp_get_pomo_file_data( string $po_file )
Extract headers from a PO file.
Description Description
Parameters Parameters
- $po_file
-
(string) (Required) Path to PO file.
Return Return
(array) PO file headers.
Source Source
File: wp-includes/l10n.php
function wp_get_pomo_file_data( $po_file ) { $headers = get_file_data( $po_file, array( 'POT-Creation-Date' => '"POT-Creation-Date', 'PO-Revision-Date' => '"PO-Revision-Date', 'Project-Id-Version' => '"Project-Id-Version', 'X-Generator' => '"X-Generator', ) ); foreach ( $headers as $header => $value ) { // Remove possible contextual '\n' and closing double quote. $headers[ $header ] = preg_replace( '~(\\\n)?"$~', '', $value ); } return $headers; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |