WordPress开发者和主题制作者的搜索引擎



get_post_format_string ›

Since3.1.0
已弃用n/a
get_post_format_string ( $slug )
参数:
  • (string) $slug A post format slug.
    Required: Yes
返回:
  • (string) The translated post format name.
定义在:
文档:

Returns a pretty, translated version of a post format slug



源码

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