get_post_format_string( string $slug )

Returns a pretty, translated version of a post format slug


Description Description


Parameters Parameters

$slug

(string) (Required) A post format slug.


Top ↑

Return Return

(string) The translated post format name.


Top ↑

Source Source

File: wp-includes/post-formats.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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