get_post_format_link()

最后更新于:2021-11-26 22:31:07

get_post_format_link( string$format)

响应s a link to a post format index.

参数

$format

(string) (Required) The post format slug.

响应

(string|GC_Error|false) The post format term link.

源文件

文件: gc-includes/post-formats.php

function get_post_format_link( $format ) {
	$term = get_term_by( 'slug', 'post-format-' . $format, 'post_format' );
	if ( ! $term || is_gc_error( $term ) ) {
		return false;
	}
	return get_term_link( $term );
}