wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_get_l10n_php_file_data › WordPress Function
Seit6.6.0
Veraltetn/v
› wp_get_l10n_php_file_data ( $php_file )
Parameter: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Extracts headers from a PHP translation file.
Ähnliche Funktionen: wp_get_pomo_file_data, get_file_data, wp_get_update_data, get_inline_data, wp_get_link_cats
Quellcode
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; }