从get_term()创建的术语对象的name属性中删除post格式前缀。
原型
_post_format_get_term( object $term )
参数
$term
(object)
(Required)
返回值
(object)
源文件
路径:wp-includes/post-formats.php
<?php
...
function _post_format_get_term( $term ) {
if ( isset( $term->slug ) ) {
$term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
}
return $term;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/_post_format_get_term/