Returns all existing headers for a given text domain.
Parameters
$textdomain
stringoptional- Text domain. Default
'default'
.Default:
'default'
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
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.