Uses
Uses | Description |
---|---|
wp-includes/functions.php: get_file_data() | Retrieve metadata from a file. |
Extract headers from a PO file.
(string) (Required) Path to PO file.
(string[]) Array of PO file header values keyed by header name.
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; }
Version | Description |
---|---|
3.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_pomo_file_data