Summery Summery
Display site icon meta tags.
Syntax Syntax
Source Source
File: wp-includes/general-template.php
} elseif ( is_category() ) {
$term = get_queried_object();
if ( $term ) {
$title = sprintf( $args['cattitle'], get_bloginfo( 'name' ), $args['separator'], $term->name );
$href = get_category_feed_link( $term->term_id );
}
} elseif ( is_tag() ) {
$term = get_queried_object();
if ( $term ) {
$title = sprintf( $args['tagtitle'], get_bloginfo( 'name' ), $args['separator'], $term->name );
$href = get_tag_feed_link( $term->term_id );
}
} elseif ( is_tax() ) {
$term = get_queried_object();
if ( $term ) {
$tax = get_taxonomy( $term->taxonomy );
$title = sprintf( $args['taxtitle'], get_bloginfo( 'name' ), $args['separator'], $term->name, $tax->labels->singular_name );
$href = get_term_feed_link( $term->term_id, $term->taxonomy );
}
} elseif ( is_author() ) {
$author_id = intval( get_query_var( 'author' ) );
$title = sprintf( $args['authortitle'], get_bloginfo( 'name' ), $args['separator'], get_the_author_meta( 'display_name', $author_id ) );
$href = get_author_feed_link( $author_id );
} elseif ( is_search() ) {
$title = sprintf( $args['searchtitle'], get_bloginfo( 'name' ), $args['separator'], get_search_query( false ) );
$href = get_search_feed_link();
}
if ( isset( $title ) && isset( $href ) ) {
echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";
}
}
/**
* Display the link to the Really Simple Discovery service endpoint.
*
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |