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



_post_format_get_term › WordPress Function

Since3.1.0
已弃用n/a
_post_format_get_term ( $term )
访问:
  • private
参数:
  • (object) $term
    Required: Yes
返回:
  • (object)
定义在:
文档:

Remove the post format prefix from the name property of the term object created by get_term().



源码

function _post_format_get_term( $term ) {
	if ( isset( $term->slug ) ) {
		$term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
	}
	return $term;
}