Advertisements

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

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: