get_post_format_string()WP 3.1.0

Returns a pretty, translated version of a post format slug

No Hooks.

Return

String. The translated post format name.

Usage

get_post_format_string( $slug );
$slug(string) (required)
A post format slug.

Changelog

Since 3.1.0 Introduced.

get_post_format_string() code WP 6.5.2

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