显示Feed类型的固定链接。
原型
the_feed_link( string $anchor, string $feed = '' )
参数
$anchor
(string)
(Required)
链接的锚文本。
$feed
(string)
(Optional)
饲料类型。
源文件
路径:wp-includes/link-template.php
<?php
...
function the_feed_link( $anchor, $feed = '' ) {
$link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>';
/**
* Filters the feed link anchor tag.
*
* @since 3.0.0
*
* @param string $link The complete anchor tag for a feed link.
* @param string $feed The feed type, or an empty string for the
* default feed type.
*/
echo apply_filters( 'the_feed_link', $link, $feed );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/the_feed_link/