Extracts headers from a PO file.
Parameters
$po_file
stringrequired- Path to PO file.
Source
/**
* Extracts headers from a PHP translation file.
*
* @since 6.6.0
*
* @param string $php_file Path to a `.l10n.php` file.
* @return string[] Array of file header values keyed by header name.
*/
function wp_get_l10n_php_file_data( $php_file ) {
$data = (array) include $php_file;
unset( $data['messages'] );
$headers = array(
'POT-Creation-Date' => 'pot-creation-date',
'PO-Revision-Date' => 'po-revision-date',
'Project-Id-Version' => 'project-id-version',
Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.