将一个post格式的slugs数组返回到它们的翻译和漂亮的显示版本
原型
get_post_format_strings()
返回值
(array)
已翻译的帖子格式名称数组。
源文件
路径:wp-includes/post-formats.php
<?php
...
function get_post_format_strings() {
$strings = array(
'standard' => _x( 'Standard', 'Post format' ), // Special case. any value that evals to false will be considered standard
'aside' => _x( 'Aside', 'Post format' ),
'chat' => _x( 'Chat', 'Post format' ),
'gallery' => _x( 'Gallery', 'Post format' ),
'link' => _x( 'Link', 'Post format' ),
'image' => _x( 'Image', 'Post format' ),
'quote' => _x( 'Quote', 'Post format' ),
'status' => _x( 'Status', 'Post format' ),
'video' => _x( 'Video', 'Post format' ),
'audio' => _x( 'Audio', 'Post format' ),
);
return $strings;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_post_format_strings/