get_post_format_link

Advertisement

Summery Summery

Returns a link to a post format index.

Syntax Syntax

get_post_format_link( string $format )

Parameters Parameters

$format

(Required) The post format slug.

Return Return

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

Source Source

File: wp-includes/post-formats.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply