wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_post_format_link › WordPress Function

Depuis3.1.0
Dépréciéen/a
get_post_format_link ( $format )
Paramètres:
  • (string) $format The post format slug.
    Requis: Oui
Retourne:
  • (string|WP_Error|false) The post format term link.
Défini(e) dans:
Codex:

Returns a link to a post format index.



Source

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 );
}