WordPress at a glance
function is not described

Gettext_Translations::make_headers() public WP 1.0

{} It's a method of the class: Gettext_Translations{}

No Hooks.

Return

Array. Null. Nothing.

Usage

$Gettext_Translations = new Gettext_Translations();
$Gettext_Translations->make_headers( $translation );
$translation(string) (required)
-

Code of Gettext_Translations::make_headers() WP 5.7

<?php
function make_headers( $translation ) {
	$headers = array();
	// Sometimes \n's are used instead of real new lines.
	$translation = str_replace( '\n', "\n", $translation );
	$lines       = explode( "\n", $translation );
	foreach ( $lines as $line ) {
		$parts = explode( ':', $line, 2 );
		if ( ! isset( $parts[1] ) ) {
			continue;
		}
		$headers[ trim( $parts[0] ) ] = trim( $parts[1] );
	}
	return $headers;
}