wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_get_l10n_php_file_data › WordPress Function
Since6.6.0
Deprecatedn/a
› wp_get_l10n_php_file_data ( $php_file )
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: |
Extracts headers from a PHP translation file.
Related Functions: wp_get_pomo_file_data, get_file_data, wp_get_update_data, get_inline_data, wp_get_link_cats
Source
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', 'X-Generator' => 'x-generator', ); $result = array( 'POT-Creation-Date' => '', 'PO-Revision-Date' => '', 'Project-Id-Version' => '', 'X-Generator' => '', ); foreach ( $headers as $po_header => $php_header ) { if ( isset( $data[ $php_header ] ) ) { $result[ $po_header ] = $data[ $php_header ]; } } return $result; }