get_post_format_string( string $slug ): string

In this article

Returns a pretty, translated version of a post format slug

Parameters

$slugstringrequired
A post format slug.

Return

string The translated post format name.

Source

function get_post_format_string( $slug ) {
	$strings = get_post_format_strings();
	if ( ! $slug ) {
		return $strings['standard'];
	} else {
		return ( isset( $strings[ $slug ] ) ) ? $strings[ $slug ] : '';
	}
}

Changelog

VersionDescription
3.1.0Introduced.

User Contributed Notes

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