get_post_format_string

Advertisement

Summery Summery

Returns a pretty, translated version of a post format slug

Syntax Syntax

get_post_format_string( string $slug )

Parameters Parameters

$slug

(string) (Required) A post format slug.

Return Return

(string) The translated post format name.

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 ] : '';
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.