[wp-trac] [WordPress Trac] #17823: feed_links() ask for comments_open()
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 17 06:48:09 UTC 2011
#17823: feed_links() ask for comments_open()
-----------------------------+-----------------------------
Reporter: Bueltge | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Feeds | Version: 3.2
Severity: normal | Keywords: dev-feedback
-----------------------------+-----------------------------
Current will WordPress also include the comment-feed with hook wp_head and
function feed_links. Maybe a small changes on this function make it
usefull for use WordPress without comments on themes.
{{{
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'),
);
if ( (get_option('default_comment_status') != 'open') )
unset( $defaults['comstitle'] );
$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";
if ( (get_option('default_comment_status') == 'open') )
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";
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17823>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list