WP_Translation_Controller::normalize_header( string $header ): string

In this article

Normalizes header names to be capitalized.

Parameters

$headerstringrequired
Header name.

Return

string Normalized header name.

Source

protected function normalize_header( string $header ): string {
	$parts = explode( '-', $header );
	$parts = array_map( 'ucfirst', $parts );
	return implode( '-', $parts );
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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