feed_links

Definition:
function feed_links( $args = array() {}

Display the links to the general feeds.

Parameters

  • array $args: Optional arguments.

Source code

function feed_links( $args = array() ) {

	if ( !current_theme_supports('automatic-feed-links') )

		return;



	$defaults = array(

		/* translators: Separator between blog name and feed type in feed links */

		'separator'	=> _x('»', 'feed link'),

		/* translators: 1: blog title, 2: separator (raquo) */

		'feedtitle'	=> __('%1$s %2$s Feed'),

		/* translators: %s: blog title, 2: separator (raquo) */

		'comstitle'	=> __('%1$s %2$s Comments Feed'),

	);



	$args = wp_parse_args( $args, $defaults );



	echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf( $args['feedtitle'], get_bloginfo('name'), $args['separator'] )) . '" href="' . get_feed_link() . "\" />\n";

	echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf( $args['comstitle'], get_bloginfo('name'), $args['separator'] )) . '" href="' . get_feed_link( 'comments_' . get_default_feed() ) . "\" />\n";

}

1054

No comments yet... Be the first to leave a reply!

Leave a comment