WordPress开发者和主题制作者的搜索引擎



the_feed_link ›

Since3.0.0
已弃用n/a
the_feed_link ( $anchor, $feed = '' )
参数: (2)
  • (string) $anchor The link's anchor text.
    Required: Yes
  • (string) $feed Optional. Feed type. Default empty.
    Required: No
    默认: (empty)
定义在:
文档:

Displays the permalink for the feed type.



源码

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