get_post_format_string()
最后更新于:2021-11-26 22:31:49
get_post_format_string( string$slug)响应s a pretty, translated version of a post format slug
参数
- $slug
-
(string) (Required) A post format slug.
响应
(string) The translated post format name.
源文件
文件: gc-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 ] : '';
}
}