WP_Translation_Controller::get_headers( string $textdomain = ‘default’ ): array<string,

In this article

Returns all existing headers for a given text domain.

Parameters

$textdomainstringoptional
Text domain. Default 'default'.

Default:'default'

Return

array<string, string> Headers.

Source

public function get_headers( string $textdomain = 'default' ): array {
	if ( array() === $this->loaded_translations ) {
		return array();
	}

	$headers = array();

	foreach ( $this->get_files( $textdomain ) as $moe ) {
		foreach ( $moe->headers() as $header => $value ) {
			$headers[ $this->normalize_header( $header ) ] = $value;
		}
	}

	return $headers;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.